2024-03-08 11:42:49 +00:00
|
|
|
import Quickshell
|
|
|
|
import Quickshell.Wayland
|
|
|
|
|
|
|
|
ShellRoot {
|
2024-06-19 00:14:51 +00:00
|
|
|
// 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;
|
|
|
|
|
|
|
|
Qt.quit();
|
|
|
|
}
|
2024-03-08 11:42:49 +00:00
|
|
|
}
|
|
|
|
|
2024-03-11 13:01:19 +00:00
|
|
|
WlSessionLock {
|
2024-03-08 11:42:49 +00:00
|
|
|
id: lock
|
|
|
|
|
2024-06-19 00:14:51 +00:00
|
|
|
// Lock the session immediately when quickshell starts.
|
|
|
|
locked: true
|
2024-03-08 11:42:49 +00:00
|
|
|
|
2024-03-11 13:01:19 +00:00
|
|
|
WlSessionLockSurface {
|
2024-06-19 00:14:51 +00:00
|
|
|
LockSurface {
|
2024-03-08 11:42:49 +00:00
|
|
|
anchors.fill: parent
|
2024-06-19 00:14:51 +00:00
|
|
|
context: lockContext
|
2024-03-08 11:42:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|