diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-22 20:50:39 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-22 20:50:39 +1000 |
| commit | 2a652d549a56b74cdf5134ffee7d84ef5e96823f (patch) | |
| tree | 27ccdd549bcd865f34eadaddddfe348fd1dbf9bc /modules/lock/Lock.qml | |
| parent | systemusage: use sensors for cpu temps (diff) | |
| download | caelestia-shell-2a652d549a56b74cdf5134ffee7d84ef5e96823f.tar.gz caelestia-shell-2a652d549a56b74cdf5134ffee7d84ef5e96823f.tar.bz2 caelestia-shell-2a652d549a56b74cdf5134ffee7d84ef5e96823f.zip | |
feat: lock screen
Diffstat (limited to 'modules/lock/Lock.qml')
| -rw-r--r-- | modules/lock/Lock.qml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/modules/lock/Lock.qml b/modules/lock/Lock.qml new file mode 100644 index 0000000..1eca886 --- /dev/null +++ b/modules/lock/Lock.qml @@ -0,0 +1,36 @@ +pragma ComponentBehavior: Bound + +import "root:/widgets" +import Quickshell +import Quickshell.Io +import Quickshell.Wayland + +Scope { + WlSessionLock { + id: lock + + LockSurface { + lock: lock + } + } + + CustomShortcut { + name: "lock" + description: "Lock the current session" + onPressed: lock.locked = true + } + + CustomShortcut { + name: "unlock" + description: "Unlock the current session" + onPressed: lock.locked = false + } + + IpcHandler { + target: "lock" + + function lock(): void { + lock.locked = true; + } + } +} |