fix(hammerspoon): stabilize window placement timing

This commit is contained in:
AquaMorph committed 2026-10-30 08:12:11 -04:00
1 parent e39b5fc3b0
commit 9a3b37d5a8
1 file changed
+3 -3
+3 -3
View File
@@ -152,9 +152,9 @@ end
filter:subscribe({hs.window.filter.windowCreated, hs.window.filter.windowTitleChanged}, function(window) filter:subscribe({hs.window.filter.windowCreated, hs.window.filter.windowTitleChanged}, function(window)
local id = window:id() local id = window:id()
if not id then return end if not id then return end
if pending[id] then pending[id]:stop() end if pending[id] then return end
-- Wait for apps to finish their own initial resize and browser page loading. -- Briefly let new windows settle without title changes delaying placement.
pending[id] = hs.timer.doAfter(1, function() pending[id] = hs.timer.doAfter(0.15, function()
pending[id] = nil pending[id] = nil
if window:id() then if window:id() then
place(window, false) place(window, false)