X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/3bf15e4af9e54586417056a819071e984bd72576..b0b9a0fea4e51381788121e5af7952813a93c97b:/awesome/widgets/mpd_widget.lua diff --git a/awesome/widgets/mpd_widget.lua b/awesome/widgets/mpd_widget.lua index 89deae1..ccd131e 100644 --- a/awesome/widgets/mpd_widget.lua +++ b/awesome/widgets/mpd_widget.lua @@ -37,7 +37,7 @@ function widget:update_widget() end local function sec_to_min(sec) - m, s = math.modf((sec or 0.0) / 60) + local m, s = math.modf((sec or 0.0) / 60) return string.format('%d:%02d', m, math.floor(s * 60)) end @@ -129,6 +129,7 @@ function widget:popup_update() self._status = status local table = self:get_info() if not self._notification then return end + if not table then return end naughty.replace_text(self._notification, table.title, table.text) end) end