Establish sequential window targeting intervals

This commit is contained in:
2026-05-24 12:58:44 -04:00
parent e57eb09567
commit e7a9ccde93
+8 -3
View File
@@ -166,9 +166,14 @@ local function executeRestore(filePath, layoutName)
win:setFrame({x=x, y=y, w=w, h=h}, 0)
end
end
-- Establish sequential window targeting intervals
-- Shifts execution past the window manager canvas updates
moveAction()
hs.timer.doAfter(0.5, moveAction)
hs.timer.doAfter(1.5, moveAction)
local intervals = isStubborn and {0.2, 0.6, 1.2, 2.2} or {0.3, 1.0}
for _, delay in ipairs(intervals) do
hs.timer.doAfter(delay, moveAction)
end
end
end
end
@@ -178,7 +183,7 @@ local function executeRestore(filePath, layoutName)
if launchedAny then
hs.alert.show("Syncing Apps...", 3)
hs.timer.doAfter(4.5, moveWindows)
hs.timer.doAfter(5.0, moveWindows) -- Bumped to 5s to let heavy frameworks build window handles completely
else
moveWindows()
end