|
|
@ -40,10 +40,12 @@ function obj:start()
|
|
|
|
for app, _ in pairs(self.quitAppsAfter) do
|
|
|
|
for app, _ in pairs(self.quitAppsAfter) do
|
|
|
|
self.windowFilter:allowApp(app)
|
|
|
|
self.windowFilter:allowApp(app)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
self.windowFilter:subscribe(hs.window.filter.windowUnfocused, function(window, appName)
|
|
|
|
self.windowFilter:subscribe(
|
|
|
|
local name = window:application():name()
|
|
|
|
{hs.window.filter.windowFocused, hs.window.filter.windowUnfocused},
|
|
|
|
self.lastFocused[name] = os.time()
|
|
|
|
function(window, appName)
|
|
|
|
end)
|
|
|
|
local name = window:application():name()
|
|
|
|
|
|
|
|
self.lastFocused[name] = os.time()
|
|
|
|
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
|
|
self.timer = hs.timer.doEvery(60, function()
|
|
|
|
self.timer = hs.timer.doEvery(60, function()
|
|
|
|
self:reap()
|
|
|
|
self:reap()
|
|
|
|