mirror of
https://github.com/belsabbagh/dotfiles.git
synced 2026-04-11 17:47:09 +00:00
41 lines
761 B
QML
41 lines
761 B
QML
import Quickshell
|
|
import Quickshell.Io
|
|
import Quickshell.Wayland
|
|
|
|
Scope {
|
|
// This stores all the information shared between the lock surfaces on each screen.
|
|
LockContext {
|
|
id: lockContext
|
|
|
|
onUnlocked: {
|
|
// Unlock the screen before exiting, or the compositor will display a
|
|
// fallback lock you can't interact with.
|
|
lock.locked = false;
|
|
|
|
}
|
|
}
|
|
|
|
WlSessionLock {
|
|
id: lock
|
|
|
|
// Lock the session immediately when quickshell starts.
|
|
locked: false
|
|
|
|
WlSessionLockSurface {
|
|
LockSurface {
|
|
anchors.fill: parent
|
|
context: lockContext
|
|
}
|
|
}
|
|
}
|
|
|
|
IpcHandler {
|
|
target: "lockscreen"
|
|
function lock() {
|
|
lock.locked = true;
|
|
}
|
|
function unlock() {
|
|
lock.locked = false;
|
|
}
|
|
}
|
|
} |