From: martin f. krafft Date: Fri, 15 Apr 2016 10:20:47 +0000 (+0200) Subject: disable auto-suspend X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/2ce8531da57ef3f91ad6b549fc02bed6320a0822 disable auto-suspend --- diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index a9a2ffc..923ddba 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -577,25 +577,25 @@ end -- }}} -- from https://blog.mister-muffin.de/2014/11/07/automatically-suspending-cpu-hungry-applications/ -client.add_signal("focus", function(c) - if c.class == "Firefox" or c.class == "chromium" or c.class == "Icedove" then - awful.util.spawn("kill -CONT " .. c.pid) - end -end) -local capi = { timer = timer } -client.add_signal("unfocus", function(c) - local timer_stop = capi.timer { timeout = 120 } - if c.class == "Firefox" or c.class == "chromium" or c.class == "Icedove" then - local send_sigstop = function () - timer_stop:stop() - if client.focus.pid ~= c.pid then - awful.util.spawn("kill -STOP " .. c.pid) - end - end - timer_stop:add_signal("timeout", send_sigstop) - timer_stop:start() - end -end) +--client.add_signal("focus", function(c) +-- if c.class == "Firefox" or c.class == "chromium" or c.class == "Icedove" then +-- awful.util.spawn("kill -CONT " .. c.pid) +-- end +--end) +--local capi = { timer = timer } +--client.add_signal("unfocus", function(c) +-- local timer_stop = capi.timer { timeout = 120 } +-- if c.class == "Firefox" or c.class == "chromium" or c.class == "Icedove" then +-- local send_sigstop = function () +-- timer_stop:stop() +-- if client.focus.pid ~= c.pid then +-- awful.util.spawn("kill -STOP " .. c.pid) +-- end +-- end +-- timer_stop:add_signal("timeout", send_sigstop) +-- timer_stop:start() +-- end +--end) -- {{{ Statusbar battery --