Session lock
Lock recovery and the secure screen
Sweets supports ext-session-lock-v1 lockers such as Swaylock, Veila, and Gtklock.
Bind your locker with direct argv:
sweets.bind("MOD+Shift+L", "spawn", { "swaylock" })Sweets presents opaque black covers before confirming a lock on every output. Desktop windows, panels, notifications, and capture remain unavailable while locked. Only the accepted lock instance can unlock the session.
If the accepted locker stops without unlocking, Sweets keeps the session locked and shows a fixed notice on the black screen after one second. A replacement locker can connect to the same Wayland display and acquire a new lock instance. The notice remains over black covers until its first surface maps; uncovered outputs stay black. Its surface never reveals the desktop underneath.
For a locker that does not supervise itself, Sweets can launch a replacement:
sweets.general({ lock_restart = { "swaylock" } })lock_restart is off by default. Sweets launches the direct argv command on
an accepted locker's crash and retries a replacement that exits before locking,
up to three launches during one locked period. A valid unlock resets the count.
Leave this unset for a locker that already restarts its own curtain.
If the notice remains, start a replacement locker from SSH or another VT with
the session's XDG_RUNTIME_DIR and WAYLAND_DISPLAY set. The Sweets log shows
the Wayland socket name. The session remains protected while recovering.