diff options
author | streetturtle <streetturtle@gmail.com> | 2016-02-22 00:10:41 +0100 |
---|---|---|
committer | streetturtle <streetturtle@gmail.com> | 2016-02-22 00:10:41 +0100 |
commit | fc8d2ed6fe9ed2f395a96b96ca7526a71edaec1a (patch) | |
tree | 8ad9f88f6ea4b61d7dc85e0debcae2acb23e16d5 /Spotify | |
parent | 6d3bf31e650bd8403923290ac7db8f7efc37a7b6 (diff) |
added spotify widget
Diffstat (limited to 'Spotify')
-rw-r--r-- | Spotify/spotify.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Spotify/spotify.lua b/Spotify/spotify.lua new file mode 100644 index 0000000..828d3e6 --- /dev/null +++ b/Spotify/spotify.lua @@ -0,0 +1,15 @@ +local wibox = require("wibox") +local awful = require("awful") + +spotify_widget = wibox.widget.textbox() + +function updateSpotifyWidget(widget) + local current = awful.util.pread('sp current-oneline') + widget:set_text(current) +end + +spotify_timer = timer ({timeout = 10}) +spotify_timer:connect_signal ("timeout", function() updateSpotifyWidget(spotify_widget) end) +spotify_timer:start() + +spotify_timer:emit_signal("timeout")
\ No newline at end of file |