summaryrefslogtreecommitdiff
path: root/spotify-widget
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@users.noreply.github.com>2017-06-03 20:43:03 -0400
committerGitHub <noreply@github.com>2017-06-03 20:43:03 -0400
commitec26e2902c0260959720911142b952f5ebff41ab (patch)
tree522f763c01511cf4d6db2165759456b2a6c0d37b /spotify-widget
parentcbe2cce0469dcb72daee5f45cf4f6e0986c018c0 (diff)
Mouse click to stop/start playing music
Diffstat (limited to 'spotify-widget')
-rw-r--r--spotify-widget/spotify.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/spotify-widget/spotify.lua b/spotify-widget/spotify.lua
index 0007e24..1a41ad0 100644
--- a/spotify-widget/spotify.lua
+++ b/spotify-widget/spotify.lua
@@ -16,3 +16,7 @@ watch(
spotify_widget:set_text(stdout)
end
)
+
+spotify_widget:connect_signal("button::press", function(_,_,_,button)
+ if (button == 1) then awful.spawn("sp play", false) end
+end)