2024-03-08 11:42:49 +00:00
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Controls.Basic
|
|
|
|
import Quickshell
|
|
|
|
import Quickshell.Wayland
|
|
|
|
|
|
|
|
ShellRoot {
|
|
|
|
AuthContext {
|
|
|
|
id: authContext
|
|
|
|
onUnlocked: lock.locked = false
|
|
|
|
}
|
|
|
|
|
2024-03-11 13:01:19 +00:00
|
|
|
WlSessionLock {
|
2024-03-08 11:42:49 +00:00
|
|
|
id: lock
|
|
|
|
locked: true
|
|
|
|
|
|
|
|
onLockedChanged: {
|
|
|
|
if (!locked) Qt.quit();
|
|
|
|
}
|
|
|
|
|
2024-03-11 13:01:19 +00:00
|
|
|
WlSessionLockSurface {
|
2024-03-08 11:42:49 +00:00
|
|
|
// You probably want to replace this with an image.
|
|
|
|
color: "#303030"
|
|
|
|
|
|
|
|
// For your own sanity you should probably keep this
|
|
|
|
// while working on the lockscreen.
|
|
|
|
Button {
|
|
|
|
text: "Help! I misconfigured my lockscreen!"
|
|
|
|
onClicked: lock.locked = false
|
|
|
|
}
|
|
|
|
|
|
|
|
Lockscreen {
|
|
|
|
anchors.fill: parent
|
|
|
|
context: authContext
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|