2017-01-23 17:01:16 +01:00
|
|
|
local wibox = require("wibox")
|
|
|
|
local awful = require("awful")
|
2017-01-26 04:47:50 +01:00
|
|
|
local watch = require("awful.widget.watch")
|
2017-01-23 17:01:16 +01:00
|
|
|
|
|
|
|
spotify_widget = wibox.widget.textbox()
|
|
|
|
spotify_widget:set_font('Play 9')
|
|
|
|
|
2017-01-26 04:47:50 +01:00
|
|
|
-- optional icon, could be replaced by spotfiy logo (https://developer.spotify.com/design/)
|
|
|
|
spotify_icon = wibox.widget.imagebox()
|
2017-02-02 03:45:15 +01:00
|
|
|
spotify_icon:set_image("/usr/share/icons/Arc/devices/22/audio-headphones.png")
|
2017-01-23 17:01:16 +01:00
|
|
|
|
2017-01-26 04:47:50 +01:00
|
|
|
watch(
|
|
|
|
"sp current-oneline", 1,
|
|
|
|
function(widget, stdout, stderr, exitreason, exitcode)
|
|
|
|
spotify_widget:set_text(stdout)
|
|
|
|
end
|
2017-01-31 03:38:50 +01:00
|
|
|
)
|