summaryrefslogtreecommitdiff
path: root/Spotify/spotify.lua
blob: 828d3e6620bcd5eab6cf32ec64658ea1d6eb6b1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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")