016dcc008f
- typo in searchindex - Cpp plugin changed to use enum lidstate - minor refactor - Using signals instead of direct property access. - Using states instead - checking lidclosed instead of preparetosleep
19 lines
241 B
QML
19 lines
241 B
QML
import Quickshell
|
|
import ZShell
|
|
import QtQuick
|
|
|
|
Scope {
|
|
id: root
|
|
|
|
signal requestLock
|
|
|
|
Connections {
|
|
function onStateChanged(): void {
|
|
if (LidWatcher.state === LidWatcher.Closed)
|
|
root.requestLock();
|
|
}
|
|
|
|
target: LidWatcher
|
|
}
|
|
}
|