From 1c04624c0a41d4be60ff5367bf2fffc5d3e975ed Mon Sep 17 00:00:00 2001 From: copycat-killer Date: Thu, 9 Feb 2017 18:27:31 +0100 Subject: [PATCH] calendar, #289: instead of setting timeout, don't show at all --- widget/calendar.lua | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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