WlSessionLock: Reloadable
import Quickshell.Wayland
Wayland session locker. More
Properties
Detailed Description
Wayland session lock implemented using the ext_session_lock_v1 protocol.
WlSessionLock will create an instance of its surface
component for every screen when
locked
is set to true. The surface
component must create a WlSessionLockSurface
which will be displayed on each screen.
The below example will create a session lock that disappears when the button is clicked.
WlSessionLock {
id: lock
WlSessionLockSurface {
Button {
text: "unlock me"
onClicked: lock.locked = false
}
}
}
// ...
lock.locked = true
If the WlSessionLock is destroyed or quickshell exits without setting locked
to false, conformant compositors will leave the screen locked and painted with a solid
color.
This is what makes the session lock secure. The lock dying will not expose your session, but it will render it inoperable.
Property Details
locked: bool
Controls the lock state.
secure: bool
The compositor lock state.
This is set to true once the compositor has confirmed all screens are covered with locks.
surface: Component
The surface that will be created for each screen. Must create a WlSessionLockSurface.