From: copycat-killer Date: Thu, 9 Feb 2017 17:27:31 +0000 (+0100) Subject: calendar, #289: instead of setting timeout, don't show at all X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/1c04624c0a41d4be60ff5367bf2fffc5d3e975ed?ds=inline;hp=--cc calendar, #289: instead of setting timeout, don't show at all --- 1c04624c0a41d4be60ff5367bf2fffc5d3e975ed diff --git a/widget/calendar.lua b/widget/calendar.lua index d3e8d4b..ce2d346 100644 --- a/widget/calendar.lua +++ b/widget/calendar.lua @@ -79,13 +79,14 @@ function calendar.show(t_out, inc_offset, scr) end end - calendar.hide() - - calendar.notification = naughty.notify({ - preset = calendar.notification_preset, - icon = calendar.icon, - timeout = (widget_focused and t_out) or calendar.notification_preset.timeout or 5 - }) + if widget_focused then + calendar.hide() + calendar.notification = naughty.notify({ + preset = calendar.notification_preset, + icon = calendar.icon, + timeout = t_out or calendar.notification_preset.timeout or 5 + }) + end end) end