Skip to content

Backport to v4-5-0: exit the screensaver when the mouse moves - #17511

Merged
ryanrhughes merged 2 commits into
omacom:v4-5-1from
jamesponwith:fix-screensaver-mouse
Nov 16, 2026
Merged

ryanrhughes merged 2 commits into
omacom:v4-5-1from
jamesponwith:fix-screensaver-mouse

Conversation

@jamesponwith

@jamesponwith jamesponwith commented Nov 4, 2026 •

Copy link
Copy Markdown

Fixes #17421.

On 4.5 the screensaver runs in a terminal, and mouse input never reaches it. Only a key press or a focus change dismisses it. The idle service deliberately leaves the screensaver up during activity and relies on the script to exit on input. So moving the mouse left the screensaver playing with the cursor hidden.

omarchy-screensaver now also checks hyprctl cursorpos on each pass of its existing once-a-second loop and exits when the pointer moves.

The launcher focuses each monitor in turn to open its screensaver, and Hyprland moves the pointer when it does. So the launcher now creates $XDG_RUNTIME_DIR/omarchy-screensaver-launching while it opens windows and removes it once focus is back on the original monitor. While the marker exists, the screensaver ignores pointer moves. However long the terminals take to open, the launcher's own moves never count as the user coming back.

quattro doesn't need this: there the native screensaver closes on any activity once the launch grace ends (5c3303b). This PR targets v4-5-0 only.

Testing

  • New test/shell.d/screensaver-mouse-test.sh runs the script in a pseudo-terminal with mocked hyprctl and ttfx. It stubs pkill, so it never touches the developer's own screensaver, and checks two things. A pointer move while the launch marker exists is ignored. A later move exits the screensaver and restores the cursor.
    • It fails against the current script, because the screensaver never exits.
    • It also fails when the screensaver ignores the marker, because the launch move closes it.
  • screensaver-workspace-test.sh (the launcher) still passes.
  • bash -n passes, and hyprctl cursorpos returns x, y on Hyprland 0.56.
  • Not tried on a real 4.5 multi-monitor desktop.

🤖 Generated with Claude Code

Mouse input never reaches the screensaver's terminal, so on 4.5 only a key
press or a focus change dismissed it. Watch the pointer instead, ignoring
the moves the launcher makes while it opens a screensaver on each monitor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; both previous findings are addressed.

Summary

Adds mouse-movement dismissal to the terminal screensaver on v4-5-0.

  • Moving the mouse after launch closes the terminal screensaver.

Review was based on source inspection. Tests and a live multi-monitor desktop were not exercised.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Launcher creates marker] --> B[Open screensavers across monitors]
  B --> C[Restore original monitor focus]
  C --> D[Remove marker]
  E[Screensaver checks pointer] --> F{Marker exists?}
  F -->|Yes| G[Clear pointer baseline]
  F -->|No| H[Record baseline or compare position]
  H --> I{Pointer moved?}
  I -->|Yes| J[Restore cursor and close screensavers]
Loading

Reviews (2) · Last reviewed commit: "Ignore pointer moves until the screensav..." · Reviewed by Greptile

Comment thread bin/omarchy-screensaver Resolved
Comment thread test/shell.d/screensaver-mouse-test.sh Resolved
A fixed grace could end while a slow terminal was still opening, and the
launcher's later focus moves then closed every screensaver. The launcher
now marks the launch, and the screensaver starts watching the pointer once
the marker is gone. The test stubs pkill and stops only its own processes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@emirb emirb added this to the 4.5.1 milestone Nov 5, 2026
@ryanrhughes
ryanrhughes changed the base branch from v4-5-0 to v4-5-1 November 16, 2026 02:00
@ryanrhughes
ryanrhughes merged commit bb66888 into omacom:v4-5-1 Nov 16, 2026
1 check passed
ryanrhughes added a commit that referenced this pull request Nov 16, 2026
…#19068)

* Replace the terminal screensaver with the native Wayland one (#16800)

Cherry-pick of #16800 to 4.5.1. The screensaver becomes the omarchy-screensaver package: one overlay per display, closed by any key, click, scroll or mouse movement. The terminal launcher, its configs, window rules and tests go, and a migration installs the package.

Conflicts were the 4.5-only fixes to the terminal screensaver (#17511 and a test fix), resolved by taking quattro's side: bin/omarchy-launch-screensaver is quattro's, and bin/omarchy-screensaver, screensaver-workspace-test.sh and #17511's screensaver-mouse-test.sh are removed.

(cherry picked from commit ce0ef48)

* Carry the screensaver manual's translations from quattro

The English chapter changed with the native screensaver. Each language's paragraph about omarchy toggle screensaver now matches quattro's translation, and the manifest marks those chapters current against the new English.

---------

Co-authored-by: Omarchybot <omabot@omarchy.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants