lockscreen: add example
This commit is contained in:
parent
0c568317df
commit
56dc79816b
6 changed files with 160 additions and 0 deletions
38
lockscreen/shell.qml
Normal file
38
lockscreen/shell.qml
Normal file
|
@ -0,0 +1,38 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls.Basic
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
|
||||
ShellRoot {
|
||||
AuthContext {
|
||||
id: authContext
|
||||
onUnlocked: lock.locked = false
|
||||
}
|
||||
|
||||
SessionLock {
|
||||
id: lock
|
||||
locked: true
|
||||
|
||||
onLockedChanged: {
|
||||
if (!locked) Qt.quit();
|
||||
}
|
||||
|
||||
SessionLockSurface {
|
||||
// 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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue