end
function widget:get_info()
- local info = {}
local status, song = self._status, self._currentsong
+ if not status.state then return nil end
+
+ local info = {}
info.title = status.state .. " " .. status.song .. "/" .. status.playlistlength .. " " .. song_duration(status.elapsed, status.duration)
if not song.artist then
info.text = string.format("%s", song.title or song.file)
function widget:popup_show()
if self._notification then return end
+
local table = self:get_info()
+ if not table then return end
+
self._timer:start()
self._notification = naughty.notify(
{ title = table.title