quickshell-examples/lockscreen/shell.qml

32 lines
566 B
QML
Raw Permalink Normal View History

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