[hammerspoon] also update last focused time on focusing for Quitter

pull/39/head
Alpha Chen 3 years ago
parent d70b0dbfff
commit 0f1876f2b8

@ -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()

Loading…
Cancel
Save