feat(lockscreen): add configurable grace period for passwordless unlock - #4032
Open
john-okeefe wants to merge 4 commits into
Open
feat(lockscreen): add configurable grace period for passwordless unlock#4032john-okeefe wants to merge 4 commits into
john-okeefe wants to merge 4 commits into
Conversation
Allow unlocking without a password shortly after locking, matching hyprlock's behavior: within the configured window after the lock request, any keypress or mouse movement exceeding 5px immediately unlocks the screen. Key implementation details: - Configurable via [lockscreen] grace_period_seconds (default 5, range 0-60); 0 disables the grace period entirely. - Grace window uses a wall-clock timestamp comparison evaluated fresh on every key and pointer event, so the window always expires on schedule. - lockedAt timestamp and grace state live on LockScreen and persist across WlSessionLockSurface recreations on resume. - logind resume handling explicitly revokes grace as a safety net, though the wall-clock check alone would also expire it. - Settings UI: stepper (0-60s) in Lock Screen > Security settings, with translation strings and example.toml documentation.
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.
Allow unlocking without a password shortly after locking, matching hyprlock's behavior: within the configured window after the lock request, any keypress or mouse movement exceeding 5px immediately unlocks the screen.
Summary
Adds a configurable grace period to the lock screen (
[lockscreen] grace_period_seconds, default 5s, range 0–60, 0 disables it entirely). While the window is open, any keypress or mouse movement beyond 5px unlocks without a password. This restores a feature that existed in the Quickshell-based Noctalia 4 lock screen (commitcbfe0aa92), reimplemented against the v5ext-session-lock-v1surface stack.Motivation
The v5 lock screen always requires a password, which is friction when locking accidentally or by idle trigger and immediately returning. Hyprlock offers a short passwordless window; this PR brings v5 in line with that.
Type of Change
Related Issue
None — mirrors the author's v4 pr (noctalia-shell commit
cbfe0aa92).Testing
just configure release/just build release— clean (733 targets).just test release— 89/90 pass. The single failure (upower_charge_limit_integration) is pre-existing: it segfaults identically on basea064c063and is unrelated to this PR.noctalia config validate— clean with the new key in a real config.python3 tools/i18n-check.py— OK (newsettings.schema.lockscreen.grace-periodstrings present).grace_period_seconds = 0always requires the password.Manual Coverage
Screenshots / Videos
None — no visual change (single settings stepper added).
Checklist
CONTRIBUTING.md.just formatwith clang-format v22+ installed (Arch Linux).assets/translations/en.json, or this PR adds no new user-facing strings.Additional Notes
lockedAt/grace state live onLockScreenand surviveWlSessionLockSurfacerecreation on resume; the logind resume path explicitly revokes grace as a safety net, though the wall-clock check alone would also expire it.example.tomldocuments the new key.