From: martin f. krafft Date: Fri, 18 Mar 2016 10:30:07 +0000 (+0100) Subject: fix timeout/timer scope X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/e89f594db976b082f6970f96fb79c36bc014ea05?ds=sidebyside fix timeout/timer scope --- diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 6996c7d..3322df2 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -582,10 +582,10 @@ client.add_signal("focus", function(c) awful.util.spawn("kill -CONT " .. c.pid) end end) +local capi = { timer = timer } client.add_signal("unfocus", function(c) - local capi = { timer = timer } + local timer_stop = capi.timer { timeout = 120 } if c.class == "Firefox" or c.class == "chromium" or c.class == "Icedove" then - local timer_stop = capi.timer { timeout = 120 } local send_sigstop = function () timer_stop:stop() if client.focus.pid ~= c.pid then