mirror of
https://github.com/kossLAN/dots.git
synced 2025-11-04 22:49:50 -05:00
53 lines
917 B
QML
53 lines
917 B
QML
pragma Singleton
|
|
pragma ComponentBehavior: Bound
|
|
|
|
import QtQuick
|
|
import Quickshell
|
|
import Quickshell.Io
|
|
import Quickshell.Wayland
|
|
import ".."
|
|
|
|
Singleton {
|
|
id: root
|
|
|
|
PersistentProperties {
|
|
id: persist
|
|
property bool locked: false
|
|
}
|
|
|
|
IpcHandler {
|
|
target: "lockscreen"
|
|
|
|
function lock(): void {
|
|
persist.locked = true;
|
|
}
|
|
}
|
|
|
|
LockContext {
|
|
id: context
|
|
|
|
Connections {
|
|
target: context.state
|
|
|
|
function onUnlocked() {
|
|
persist.locked = false;
|
|
}
|
|
}
|
|
}
|
|
|
|
WlSessionLock {
|
|
id: lock
|
|
locked: persist.locked
|
|
|
|
WlSessionLockSurface {
|
|
LockSurface {
|
|
state: context.state
|
|
wallpaper: ShellSettings.settings.wallpaperUrl
|
|
anchors.fill: parent
|
|
}
|
|
}
|
|
}
|
|
|
|
function init() {
|
|
}
|
|
}
|