]> git.rmz.io Git - dotfiles.git/blobdiff - awesome/widgets/mpc.lua
awesome: add play/pause functions to mpd client
[dotfiles.git] / awesome / widgets / mpc.lua
index ae4f658f8cdacc253f67b11c994311b94e0103e0..ef56c43ed7ba7f2bb0076e09250dd304e7ca22a8 100644 (file)
@@ -216,6 +216,14 @@ function mpc:toggle_play()
     end)
 end
 
+function mpc:play()
+    self:send("play")
+end
+
+function mpc:pause()
+    self:send("pause")
+end
+
 function clamp(x, min, max)
     return math.min(math.max(x, min), max)
 end