diff --git a/themes/copland/wall.png b/themes/copland/wall.png index 1a00f00..fe13898 100644 Binary files a/themes/copland/wall.png and b/themes/copland/wall.png differ diff --git a/themes/powerarrow-dark/theme.lua b/themes/powerarrow-dark/theme.lua index d3bb600..1ba1bd2 100644 --- a/themes/powerarrow-dark/theme.lua +++ b/themes/powerarrow-dark/theme.lua @@ -130,8 +130,22 @@ local mail = lain.widget.imap({ --]] -- MPD +local musicplr = awful.util.terminal .. " -title Music -g 130x34-320+16 -e ncmpcpp" local mpdicon = wibox.widget.imagebox(theme.widget_music) -mpdicon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.spawn_with_shell(musicplr) end))) +mpdicon:buttons(awful.util.table.join( + awful.button({ modkey }, 1, function () awful.spawn.with_shell(musicplr) end), + awful.button({ }, 1, function () + awful.spawn.with_shell("mpc prev") + theme.mpd.update() + end), + awful.button({ }, 2, function () + awful.spawn.with_shell("mpc toggle") + theme.mpd.update() + end), + awful.button({ }, 3, function () + awful.spawn.with_shell("mpc next") + theme.mpd.update() + end))) theme.mpd = lain.widget.mpd({ settings = function() if mpd_now.state == "play" then diff --git a/themes/powerarrow/theme.lua b/themes/powerarrow/theme.lua index 433fbc5..fd0d01e 100644 --- a/themes/powerarrow/theme.lua +++ b/themes/powerarrow/theme.lua @@ -157,10 +157,19 @@ theme.volume = lain.widget.alsabar({ local musicplr = awful.util.terminal .. " -title Music -g 130x34-320+16 -e ncmpcpp" local mpdicon = wibox.widget.imagebox(theme.widget_music) mpdicon:buttons(awful.util.table.join( - awful.button({ modkey }, 1, function () awful.spawn_with_shell(musicplr) end), - awful.button({ }, 1, function () awful.spawn_with_shell("mpc prev") end), - awful.button({ }, 2, function () awful.spawn_with_shell("mpc toggle") end), - awful.button({ }, 3, function () awful.spawn_with_shell("mpc next") end))) + awful.button({ modkey }, 1, function () awful.spawn.with_shell(musicplr) end), + awful.button({ }, 1, function () + awful.spawn.with_shell("mpc prev") + theme.mpd.update() + end), + awful.button({ }, 2, function () + awful.spawn.with_shell("mpc toggle") + theme.mpd.update() + end), + awful.button({ }, 3, function () + awful.spawn.with_shell("mpc next") + theme.mpd.update() + end))) theme.mpd = lain.widget.mpd({ settings = function() if mpd_now.state == "play" then