Idle and lock
Idle and lock come on with the profile. After this many seconds without input:
| At | What | Why this step |
|---|---|---|
| 2 min | the panel dims to 10% (brightnessctl -s set 10%, restored on activity) |
the backlight is most of idle draw (measured on the M2: 4.55 W screens on, 1.52 W both off) |
| 4 min | the session locks (loginctl lock-session, locker over ext-session-lock-v1) |
after dim, before screens off, so the lock is already up when the panel goes dark and no unlocked frame is ever visible on wake |
| 5 min | every output powers off (wlopm --off '*', back on at the first input, locked or not; with display profiles on, the matched profile then re-applies, so its disabled outputs stay off) |
the measured 3 W saving |
| sleep | locks first, then sleeps (swayidle’s before-sleep, waited on) |
suspend must never land on an unlocked session |
| docked lid close | locks, does not suspend | a closed lid on a multi-output box means the user walked away, not that the session should die |
Audio holds the whole sequence off while anything plays (any sink or source running), so music or a call never dims the panel. Any input restarts every timer from zero, so there is nothing to reset after unlock. One timeout set covers AC and battery alike.
The locker follows the look: screen and indicator from its palette (a
value in lock. winning per key, theme. dropping the themed block while the rest follows the look).
Locked, the wallpaper shows behind everything, blurred, with the
indicator always visible and a message saying what to do. The music-desk
palette over its blurred wallpaper:

Without a wallpaper the lock falls back to a navy screen, still with
the indicator and the message; with no look at all it is the same navy
screen with a white ring. A wrong password says so
(Wrong password. Try again.), and the screen still locks even if an
image cannot load.
Each output shows its own wallpaper, as it is when the lock starts: the
one you set with scootbg set (per output or per workspace), a slideshow’s
current image, or the one scoot look apply brought, blurred. scootbg keeps
the blurred copy up to date and the locker reads it at lock time (the
format). No rebuild is needed.
Per output, the lock falls back in this order, and it always locks:
- scootbg’s picture of that output’s wallpaper.
- The blur built from the wallpaper of the look you configure in Nix.
- The look’s
color(the navy screen without a look).
So the built blur shows on an output scootbg has no picture for yet, on every
output when scootbg is not running, and when a picture cannot load. The live
pictures are off, and the built blur shows everywhere, when
theme. is false (the navy tile is the look there) or
when lock. sets its own image (an image you point at wins). A
solid-color wallpaper locks to a flat screen of that color.
If you set desktop. yourself, it must match
desktop.. A locker that does not know a key in the
config stops reading it there and locks with what it parsed, which can
be a flat color with no message.
Unlock checks your password through PAM, as swaylock. On NixOS the
scoot module names that service itself, so unlocking works with no
extra setup. On any other Linux, home-manager cannot provide it, so set
up /etc/pam. wherever PAM is configured, or no password
will ever unlock.
security.pam.services.swaylock = {};Every value is an option, applied on rebuild/switch (the units restart into the new config; no re-login):
| Option | Type | Default | Meaning |
|---|---|---|---|
desktop. |
bool | true with the profile |
run the policy (dim, screens off, sleep lock, audio hold) |
desktop. |
int (seconds) | 120 |
inactivity before dimming; 0 disables the step |
desktop. |
int (percent, 1-100) | 10 |
brightness the dim step sets |
desktop. |
int (seconds) | 240 |
inactivity before locking; 0 disables the step (sleep still locks) |
desktop. |
int (seconds) | 300 |
inactivity before outputs power off; 0 disables the step |
desktop. |
bool | true with the profile |
hold idle while audio plays (needs PipeWire or PulseAudio running) |
desktop. |
bool | true with the profile |
lock through the locker below |
desktop. |
string | loginctl lock-session (system path on NixOS) |
the stable lock action: what the timeout runs, and what the keymap’s Super+Escape bind runs (lid-close and manual locks share this path through logind) |
desktop. |
enum ("swaylock-effects", "swaylock") |
"swaylock-effects" |
the locker behind the action: the effects fork (blurred screen, always-visible indicator, unlock message; a future scootlock widens this without renaming anything), or stock swaylock one line back (the same blurred screen, hidden-until-you-type indicator, no message) |
desktop. |
attrset of string | { } |
extra locker lines over the themed ones (a value here wins per key) |
desktop. |
bool | true |
theme the locker from the look; false keeps swaylock’s own style while the rest follows the look |
programs.scoot.desktop = { enable = true; # Later to bed: lock at 10 min, screens off at 15. idle.lockTimeout = 600; idle.offTimeout = 900; # No idle policy at all (the profile turns the set on; each switch below # turns its piece back off): # idle.enable = false; # idle.lock.enable = false; # idle.mediaInhibit.enable = false;};Troubleshooting, by symptom:
Symptom: Lock screen rejects the right password.
No
swaylockPAM service exists, so PAM falls back toother, which denies everything. On NixOS setsecurity.(automatic with the scoot NixOS module); on any other Linux providepam. services. swaylock = {}; /etc/pam.wherever PAM is configured. A locker already running keeps failing: it reads PAM once at launch. Kill it (d/swaylock pkill -x swaylock); the session stays locked behind a red screen, and the next lock starts a new locker that reads the new service. Check Caps Lock second; the indicator shows its state while you type.
- Screens never dim or power off. Check the unit is running:
systemctl --user status scoot-idle, and that it started with the display (a hand-started session must reachscoot-session.withtarget WAYLAND_DISPLAYimported, on the desktop page). The generated config is at~/.; the timeouts are literal. Dim specifically needs the seat: logind grants the active login backlight access, so dim works in the seat session and logs EPERM anywhere else (over ssh, from a timer with no session).config/swayidle/config - The timeout passes and the session never locks. The locker is
probably exiting immediately: run
swaylock -f -C ~/.by hand. If it drops straight back to the prompt, its error names the cause.config/swaylock/config loginctl lock-sessiondoes nothing visible. Something must listen for logind’s Lock (the policy’slockevent), soscoot-idleis not running orlock.is off.enable - Music dims the panel. The hold needs the inhibitor unit and an
audio server:
systemctl --user status scoot-audio-inhibitplus something actually playing. Without a server the unit backs off and stays stopped. - Closing the docked lid suspends. Something beat the profile’s docked-lid lock rule: your own logind setting wins over it.
Without the flake, the same policy is a hand-written swayidle setup; see Idle in the compositor reference.
