From ec26e2902c0260959720911142b952f5ebff41ab Mon Sep 17 00:00:00 2001 From: streetturtle Date: Sat, 3 Jun 2017 20:43:03 -0400 Subject: Mouse click to stop/start playing music --- spotify-widget/spotify.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'spotify-widget') 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) -- cgit v1.2.3