Inhibit screensaver/lock while an AI CLI session is active #6339
Replies: 2 comments
-
|
Suggestion: Waybar's built-in You don't necessarily need a custom hypridle script for this — Waybar ships a native Setup (it's built into Waybar, nothing to install):
"modules-right": [
"idle_inhibitor",
// ...your other modules
],
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
},
"tooltip-format-activated": "Idle inhibitor: on",
"tooltip-format-deactivated": "Idle inhibitor: off"
}
Now just click the icon before kicking off a long-running agent task. Since it uses the standard Wayland inhibit protocol, If you'd rather it be automatic (detecting Claude/Codex/Gemini/etc.), the script-based hypridle approach in this thread is the way to go — but for a lot of people the one-click toggle is enough. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks! I didn't know Waybar had a built-in |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
When working with AI coding assistants in the terminal (claude, devin, codex, gemini, aider), the screensaver and lock still fire on their normal idle timers. Long-running agent tasks get interrupted by the screensaver/lock, which is annoying since the user is actively engaged even though there is no keyboard/mouse input.
I have a local workaround that works well and I would like to upstream it. The approach:
A small helper script that returns 0 when any AI CLI is running, 1 otherwise. It matches by
pgrep -xfor short process names andpgrep -fEfor path fragments to catch node/wrapper invocations:claude,devin,codex,gemini,aiderclaude-code/bin/claude,@openai/codex,@google/gemini-cli,/devin/cliconfig/hypr/hypridle.confguards both listeners:Because
omarchy-system-lockis what turns off the keyboard backlight (viaomarchy-brightness-keyboard off), guarding the lock listener also keeps the keyboard backlight on during AI sessions — no separate listener needed.I would contribute this as a PR with:
bin/omarchy-cmd-ai-cli-running(following thecmd-prefix convention)config/hypr/hypridle.confOne concern: I noticed the
omarchy-shell/omarchy-4branches are moving idle management from hypridle to a Quickshell-basedIdleService. If that is the direction, I am happy to implement the AI-CLI guard there instead (or in addition) so it survives the v4 transition.Thoughts? Happy to open a PR either way.
Beta Was this translation helpful? Give feedback.
All reactions