diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-18 12:26:48 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-18 12:26:48 +0200 |
| commit | 25e33522a74d9ffb71e399d9060d9fdef42e792d (patch) | |
| tree | cc950e645f1f2e83cb7e0f04d66f3317283f32d8 /desktop/modules/status/README.md | |
| parent | e81c248c6243719f62b426dd68b0a74dc5b912d8 (diff) | |
| download | quickshell-25e33522a74d9ffb71e399d9060d9fdef42e792d.tar.gz quickshell-25e33522a74d9ffb71e399d9060d9fdef42e792d.zip | |
feat(status): add a screen lock mode
dnd and presentation were the only modes, and presentation was the sole
holder of the Wayland idle inhibitor. That inhibitor is the only thing
that stops hypridle's loginctl lock-session at the 600s timeout, so
screen locking is on by default and there was no way to turn it off on
its own.
nolock is stored as "auto-lock disabled" so the file keeps the registry's
"missing means off" rule, and the row inverts it so the switch reads as
the default: lock on. Presentation now drives nolock the same way it
drives dnd, holding the prior value in memory and restoring it on exit,
so it needs no second inhibitor and the inhibitor has a single holder.
The page sets the disable permanently or for a number of minutes. The
deadline and its timer live in the singleton rather than the row because
the drawer page is destroyed on close while the effect has to outlive
it. The timer is shell-lifetime, the same class of limit as
dndBeforePresentation: a restart during a timed disable leaves the lock
off until it is toggled, which is safe because the user opted into the
disable.
The mode governs idle-triggered locking only. The SUPER+l bind and the
lock on suspend are separate paths and stay live.
Diffstat (limited to 'desktop/modules/status/README.md')
| -rw-r--r-- | desktop/modules/status/README.md | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/desktop/modules/status/README.md b/desktop/modules/status/README.md index 2092890..571f859 100644 --- a/desktop/modules/status/README.md +++ b/desktop/modules/status/README.md @@ -1,17 +1,22 @@ # status -Desktop modes as state: `dnd` and `presentation`, owned by the `Status` -singleton and stored as files under `$XDG_RUNTIME_DIR`. +Desktop modes as state: `dnd`, `presentation` and `nolock`, owned by the +`Status` singleton and stored as files under `$XDG_RUNTIME_DIR`. ## The files are the interface $XDG_RUNTIME_DIR/status.dnd $XDG_RUNTIME_DIR/status.presentation + $XDG_RUNTIME_DIR/status.nolock Each holds `0` or `1`; a missing file means off. That directory is tmpfs, so a reboot resets every mode and there is no cleanup code. A shell restart does not: the files outlive the process and the singleton reads them back. +`nolock` is stored as "auto-lock disabled", which is the inverse of the switch +the page shows. The file keeps the registry's "missing means off" rule, and the +page inverts it so the label reads as the default: screen lock on. + Anything can read a mode with `cat`. `statusctl` is the convenience, not the mechanism, which is why it keeps working while quickshell is down. @@ -35,9 +40,18 @@ and reasserted when it returns. `dnd` has none of its own. It is state the notification daemon reads. -`presentation` sets `dnd`, asserts a Wayland idle inhibitor, and pauses -breaktimer. Turning it off restores `dnd` to the value it had before rather -than clearing it, so hand-set DND survives a presentation. +`presentation` sets `dnd` and `nolock`, asserts a Wayland idle inhibitor, and +pauses breaktimer. Turning it off restores `dnd` and `nolock` to the values +they had before rather than clearing them, so hand-set DND or a hand-set +disable survives a presentation. + +`nolock` disables auto-lock by holding the idle inhibitor. That is the only +thing that stops hypridle's `loginctl lock-session`, so the mode governs +idle-triggered locking and nothing else: the `SUPER+l` bind and the lock on +suspend are separate paths and stay live. The page can set it permanently or +for a number of minutes, in which case the singleton's timer re-enables it. +The timer is shell-lifetime: a restart during a timed disable leaves the lock +off until it is toggled, the same class of limit as `dndBeforePresentation`. breaktimer owns `$XDG_RUNTIME_DIR/breaktimer.state`. This module calls `breaktimer.sh pause|resume` and never writes that file: its daemon loop |
