Repository navigation
Add an optional screensaver to the lock screen - #8409
Closed
TripleU613 wants to merge 1 commit into
Closed
TripleU613 wants to merge 1 commit into
TripleU613 wants to merge 1 commit into
Conversation
The session lock renders above every window, and omarchy-system-lock kills ttfx on the way in, so locking has always ended the screensaver and blanked the display. Keeping something on screen therefore meant not locking at all. Draw the branding animation on the lock surface itself instead, behind the password field. Off by default; enabled with idle.lockScreensaver, with idle.lockScreensaverDelay seconds of lock screen first and idle.lockScreensaverDuration seconds before the display blanks, where 0 never blanks. Honours omarchy toggle screensaver. The password field is faded rather than hidden so it keeps focus, and the first keystroke both dismisses the animation and enters the password.
TripleU613
force-pushed
the
lock-screensaver
branch
from
August 26, 2026 15:38
f5dee44 to
ecda5c7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
There is currently no way to have anything on screen while the machine is locked. If you like the screensaver and want to leave it running, your only option is to not lock — which is exactly the wrong trade to make.
Three things enforce that today, and they are all deliberate:
bin/omarchy-system-lockkills the screensaver on the way in —pkill -x ttfx, under the comment "Avoid running screensaver when locked".ext-session-locksurface (WlSessionLockinshell/plugins/lock/Service.qml) that renders above every window by design. The same applies to awlr-layer-shellclient, so Replace terminal screensaver with native Wayland client #7193 does not change this.launchScreensaver()in the idle service short-circuits onomarchy-shell lock isLocked, so a cycle that starts while locked is skipped.The consequence is that
idle.lockis the only dial available, and turning it up far enough to keep the animation going means the machine effectively stops locking. On a desktop that gets left overnight, that is a real exposure — which is what prompted this.The approach
Rather than trying to keep a window alive over the lock, draw the animation on the lock surface itself, behind the password field. The session stays locked the entire time; nothing is layered over the lock and no window survives it.
shell/plugins/lock/Screensaver.qmlis a new, input-transparent component: noMouseArea, no focus, so every keystroke still reaches the password field behind it. It renders the same~/.config/omarchy/branding/screensaver.txtart the windowed screensaver uses, so Style > Screensaver continues to drive both. Each cycle picks one of three effects (fade-and-scale, typewriter reveal, scramble-resolve), a new colour from the theme palette, and a new screen position, so it is not a static logo burned into one spot.Configuration
New keys in the existing
idleblock ofshell.json, all off by default:lockScreensaver— off unless set totrue. Absent keys mean stock behaviour, soconfig/omarchy/shell.jsonis untouched.lockScreensaverDelay— seconds of ordinary lock screen before the animation fades in.lockScreensaverDuration— seconds the animation runs before the display blanks.0, the default, never blanks: it runs for as long as the session stays locked.omarchy toggle screensavergates this too — someone who turned the screensaver off does not get one on their lock screen.Notes on the implementation
TextInputcannot hold focus, and losing focus would swallow the first keystroke of the password. It sits atopacity: 0and stays enabled.onPositionChangedfires on any movement, and jitter from an optical mouse would otherwise stop the animation ever starting.Imageand its blurMultiEffectare switched off while the animation is up. WithlockScreensaverDuration: 0the display never blanks, so leaving a full-screen 128px blur compositing indefinitely would be a pointless load.idleBlankTimer's interval now covers the delay plus the duration, since its deadline is measured from the lock rather than from when the animation starts.Verification
Verified in the running UI:
opacity: 0, three simulated keystrokes (wtype) dismissed the animation and all three landed in the password field. Nothing was swallowed../test/all— 5 pre-existing failures on my machine (bar-icon-geometry,config,snapper,theme-install-guards,unowned-system-paths), identical with and without this change on a stashed tree. No regressions introduced.Not verified, stated plainly:
lockScreensaverDuration > 0— the blank path. The blank timer is only armed by a real lock, so it cannot be exercised through the lock preview.LockView.qmlin a user plugin directory, because sibling QML types do not resolve there. Submitted in the conventional shape as a siblingScreensaver.qml, matching howService.qmlalready resolvesLockView.Happy to move this to a suggestions discussion instead if that is the preferred route for a feature of this size.