End a running idle cycle when both timeouts are set to 0

With both at 0 the monitor is disabled and handleIdleChanged returns early, so a cycle already running when shell.json changed never cancels: omarchy-system-wake never runs, and if the screensaver never opened a window nothing else ends it. Cancel it the way turning on stay-awake does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Codex Medium <noreply@openai.com>
This commit is contained in:
committed 2026-10-01 12:30:46 +02:00
1 parent 3839d0b4e0
commit 3cebdc3412
2 files changed
+7

No files matched your search

+4
View File
@@ -51,6 +51,10 @@ assert(
!/interval: root\.screensaverDelaySeconds/.test(serviceSource),
'idle keeps a pending screensaver on its deadline when shell.json changes mid-cycle'
)
assert(
/onIdleTimersEnabledChanged: if \(!idleTimersEnabled\) cancelIdleCycle\(/.test(serviceSource),
'idle ends a running cycle when both timeouts are set to 0'
)
assertDeepEqual(idle.eventParts({ data: 'a,b,c' }, 2), ['a', 'b', 'c'], 'idle parses raw event data')
assertDeepEqual(