Repository navigation
Conversation
The screensaver only exits when a character reaches its terminal, so Shift, Ctrl, Alt and Super do nothing, and the keys that do work get typed into whatever window takes focus next. Modifiers never produce a character, so bind both sides of each to close the screensaver windows. The binds are non-consuming and check for a screensaver window first, so an ordinary modifier press still reaches the app. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Automated AI review
Outcome: The dismiss handler closes the focused window, not the screensaver windows it looked up.
|
hl.dsp.window.close takes its target from a table's window field. A window object passed on its own is ignored and the close falls back to the focused window, so a modifier tap while another window had focus closed that window. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Thanks, the main finding is right. Fixed in 0731b76.
The unfocused case is covered by the stub test only. On a single monitor the screensaver exits when it loses focus, so I could not set that case up live. |
What
A lone tap of Shift, Ctrl, Alt or Super (either side) now dismisses the screensaver, the way it does on macOS and Windows. Hyprland matches these binds when the key is released.
Why
omarchy-screensaverexits when a character reaches its terminal (read -n1) or focus leaves the window. A modifier key sends no character, so tapping Shift does nothing. The keys that do work are character keys, and the wake keystroke is easy to have land in whatever window takes focus next, so a Space or Enter meant to wake the screen ends up typed into an editor or chat box.Modifiers never produce a character, which makes them the wake keys that cannot leak.
How
default/hypr/bindings/screensaver.luabinds both sides of each modifier, non-consuming, to a Lua function that looks up windows of classorg.omarchy.screensaverand closes each through the window close dispatcher,hl.dsp.window.close({ window = window }). The terminal exits and the screensaver script takes its usual cleanup path (cursor restored,ttfxkilled).omarchy_default_bindingsblock, so users who disable default bindings are not affected.Testing
test/shell.d/screensaver-dismiss-test.shloads the binds against a stubhland checks that every screensaver window gets a close request, and the focused window does not, whichever window has focus.omarchy-launch-screensaver force, injected a real keypress for each of the eight modifier keys through uinput (ydotool), and confirmed the screensaver window closed each time and the cursor became visible again.hyprland-default-config-test,hyprland-binding-conflicts-test,keybindings-menu-testandshell-shortcuts-testpass. The rest of./test/allshows the same environment-related failures on a cleanquattrocheckout.Known limits
de,gb,usintl) the key resolves toISO_Level3_Shift, so Right Alt is not expected to wake the screensaver there. Not tested; the other seven keys are unaffected.Mouse movement still does not wake the screensaver; Hyprland can't bind pointer motion, so that would need the idle service and is left for a follow-up.
🤖 Generated with Claude Code