Commit Graph
10 Commits
Author SHA1 Message Date
3cebdc3412 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>
2026-10-01 12:30:46 +02:00
3839d0b4e0 Keep a pending idle action on its deadline when the timings change
With 0 meaning off, setting the screensaver to 0 while the screensaver is up moves the first idle deadline to the lock's, which turns the pending lock's bound interval to 0 and locks at once, minutes early. Set each timer's interval when the cycle starts, so a change to shell.json takes effect from the next cycle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Codex Medium <noreply@openai.com>
2026-10-01 11:45:45 +02:00
OmarchybotandClaude Opus 5.5 377b15be4b Don't fire a pending idle action whose timeout was set to 0
The timers' intervals are bound to the configured delays, so setting the lock or screensaver to 0 while the screensaver is up turns a pending timer's interval to 0 and it fires at once. Check the action is still enabled when its timer fires.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 11:29:30 +02:00
Paulo Geyer 14921a956e Treat idle timeout 0 as disabled, not immediate
idle.screensaver / idle.lock of 0 was included in Math.min(), so
IdleMonitor's timeout became 0. Releasing a Wayland idle inhibitor
(SDL's default screensaver inhibit) then reported idle immediately and
locked the session even when lock had been "disabled" by setting it to 0.

Treat 0 as disabled when computing the first idle deadline, do not start
the corresponding action, and leave IdleMonitor off when both timeouts
are 0.

Fixes #10860
2026-09-19 13:57:52 -03:00
Ryan HughesandGPT-5.6-Sol 3292c19fef Preserve built-in clone integrations
Co-Authored-By: GPT-5.6-Sol <noreply@openai.com>
2026-09-06 22:04:48 -04:00
David Heinemeier HanssonandClaude Fable 5 a64d895a02 Spawn shell subprocesses with bash -c instead of bash -lc
Each `bash -lc` starts a login shell that re-sources the profile
(mise activation, /etc/profile.d) on every invocation — ~16 forks per
call versus ~2 for `bash -c` — which taxes every menu/panel/launcher
action the shell shells out for. The session already exports PATH and
env to the shell, so omarchy commands resolve fine under `bash -c`.

Switch the internal/omarchy-owned spawns (theme+background switches,
brightness, monitor scaling, DNS, lock/fingerprint, keyboard-layout
probe, voxtype status, and the `:`/printf state-file writes) to
`bash -c`. Leave `bash -lc` on the sites that run user-configurable
commands (custom bar-widget exec, menu provider/guard scripts,
launcher scan commands, configurable idle/screensaver command), where
a user's command may rely on their login environment.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 22:46:27 -07:00
David Heinemeier Hansson 829c1fa4f7 Add shell plugin model tests 2026-05-25 14:18:39 +02:00
David Heinemeier Hansson b92a44d572 Persist StayAwake indicator state 2026-05-23 15:15:55 +02:00
David Heinemeier Hansson d1b452cc5f Lock before suspend with sleep inhibitor service 2026-05-21 07:57:08 +02:00
David Heinemeier Hansson 4f1ef8d95f Give services their own place 2026-05-20 14:03:56 +02:00