]> git.rmz.io Git - dotfiles.git/blobdiff - awesome/widgets/mpc.lua
awesome/mpd_widget: add persistent popup
[dotfiles.git] / awesome / widgets / mpc.lua
index f357f18b48b54dd85a70241b5a41dc7e2534e818..d870f2f8f3cc374b63be48fd23f43a65a5a4450c 100644 (file)
@@ -214,6 +214,15 @@ function mpc:change_volume(change)
     end)
 end
 
+function mpc:currentsong()
+    local currentsong
+    self:send("currentsong", function(err, song)
+        if err then error(err) end
+        currentsong = song
+    end)
+    return currentsong
+end
+
 --[[
 
 -- Example on how to use this (standalone)