From e7a9ccde9346d0fb1851a0cb810033b23a424e32 Mon Sep 17 00:00:00 2001 From: Franco Pellicciotti Date: Sun, 24 May 2026 12:58:44 -0400 Subject: [PATCH] Establish sequential window targeting intervals --- LayoutSelector.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/LayoutSelector.lua b/LayoutSelector.lua index dbfa236..35880d6 100644 --- a/LayoutSelector.lua +++ b/LayoutSelector.lua @@ -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