mirror of
https://github.com/AquaMorph/dotfiles.git
synced 2026-11-03 08:17:59 +00:00
fix(hammerspoon): stabilize window placement timing
This commit is contained in:
1 parent
e39b5fc3b0
commit
9a3b37d5a8
1 file changed
+3
-3
@@ -152,9 +152,9 @@ end
|
||||
filter:subscribe({hs.window.filter.windowCreated, hs.window.filter.windowTitleChanged}, function(window)
|
||||
local id = window:id()
|
||||
if not id then return end
|
||||
if pending[id] then pending[id]:stop() end
|
||||
-- Wait for apps to finish their own initial resize and browser page loading.
|
||||
pending[id] = hs.timer.doAfter(1, function()
|
||||
if pending[id] then return end
|
||||
-- Briefly let new windows settle without title changes delaying placement.
|
||||
pending[id] = hs.timer.doAfter(0.15, function()
|
||||
pending[id] = nil
|
||||
if window:id() then
|
||||
place(window, false)
|
||||
|
||||
Reference in new issue
Block a user