Files
z-bar-qt/Modules/Lock/Lock.qml
T
AramJonghu 016dcc008f
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 12s
Python / lint-format (pull_request) Successful in 26s
Python / test (pull_request) Successful in 1m3s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m9s
Cpp changes, minor refactor plus separate signal logic, typo.
- 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
2026-06-03 00:54:44 +02:00

55 lines
662 B
QML

pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Wayland
import Quickshell.Io
import QtQuick
import qs.Components
Scope {
id: root
property alias lock: lock
property int seenOnce: 0
WlSessionLock {
id: lock
signal requestLock
signal unlock
onRequestLock: lock.locked = true
onUnlock: lock.locked = false
LockSurface {
id: lockSurface
lock: lock
pam: pam
}
}
Pam {
id: pam
lock: lock
}
IpcHandler {
function lock() {
return lock.locked = true;
}
target: "lock"
}
CustomShortcut {
description: "Lock the current session"
name: "lock"
onPressed: {
lock.locked = true;
}
}
}