summaryrefslogtreecommitdiff
path: root/spotify-widget
diff options
context:
space:
mode:
authorPavel Makhov <pavel.makhov@savoirfairelinux.com>2017-04-14 09:59:25 -0400
committerPavel Makhov <pavel.makhov@savoirfairelinux.com>2017-04-14 09:59:25 -0400
commitfc438f8419373209333ee9bdf86470c54d704dd2 (patch)
treeec42b245d05738dd565ad22f85fbdef986afb748 /spotify-widget
parent8755d9eddefb0b5ce42d1fddc0ed87a743d91dd0 (diff)
parent8f8b5588ae7056761bfd7ca3bee654501380ff0f (diff)
Merge branch 'master' of https://github.com/streetturtle/AwesomeWM
Diffstat (limited to 'spotify-widget')
-rw-r--r--spotify-widget/README.md2
-rw-r--r--spotify-widget/spotify.lua3
2 files changed, 4 insertions, 1 deletions
diff --git a/spotify-widget/README.md b/spotify-widget/README.md
index 4d8f4b9..1454588 100644
--- a/spotify-widget/README.md
+++ b/spotify-widget/README.md
@@ -2,6 +2,8 @@
This widget displays currently playing song on [Spotify for Linux](https://www.spotify.com/download/linux/) client: ![screenshot](./spo-wid-1.png).
+If clicked plays/pauses the music.
+
Note that widget uses the Arc icon theme, so it should be [installed](https://github.com/horst3180/arc-icon-theme#installation) first under **/usr/share/icons/Arc/** folder.
## Installation
diff --git a/spotify-widget/spotify.lua b/spotify-widget/spotify.lua
index dcca1c0..0007e24 100644
--- a/spotify-widget/spotify.lua
+++ b/spotify-widget/spotify.lua
@@ -4,6 +4,7 @@ local watch = require("awful.widget.watch")
spotify_widget = wibox.widget.textbox()
spotify_widget:set_font('Play 9')
+spotify_widget:connect_signal("button::release", function() awful.spawn('sp play'); end)
-- optional icon, could be replaced by spotfiy logo (https://developer.spotify.com/design/)
spotify_icon = wibox.widget.imagebox()
@@ -14,4 +15,4 @@ watch(
function(widget, stdout, stderr, exitreason, exitcode)
spotify_widget:set_text(stdout)
end
-) \ No newline at end of file
+)