diff --git a/mpris-widget/init.lua b/mpris-widget/init.lua index 8759fb6..e5e149a 100644 --- a/mpris-widget/init.lua +++ b/mpris-widget/init.lua @@ -70,7 +70,8 @@ function playerctl:watch(timeout, callback, widget) callback(cb_widget, metadata) end - _, self.timer = awful.widget.watch(cmd, timeout, cb, widget) + local _, timer = awful.widget.watch(cmd, timeout, cb, widget) + self.timer = timer end function playerctl:toggle() awful.spawn(self:cmd('play-pause'), false) end