ported some quickshell stuff from rivendell-hyprdots

This commit is contained in:
Tomas Rivera
2026-03-10 16:22:35 +01:00
parent 4b442dd121
commit b9e3f35abe
80 changed files with 4462 additions and 9 deletions
+47
View File
@@ -0,0 +1,47 @@
pragma Singleton
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Io
import Quickshell.Wayland
import QtQuick
import "." as Lock
Singleton {
Process {
id: screencopyCmd
running: false
command: ["grim", "-s", "0.5", "-t", "jpeg", "/tmp/lock_screencopy.jpeg"]
onExited: lock.locked = true
}
IpcHandler {
target: "lockscreen"
function lock(): void {
screencopyCmd.running = true;
}
}
WlSessionLock {
id: lock
locked: false
WlSessionLockSurface {
id: lockSurface
color: "transparent"
Lock.Surface {
anchors.fill: parent
context: lockContext
}
}
}
Lock.Context {
id: lockContext
onUnlocked: lock.locked = false
}
// Empty function to define first reference to singleton
function init() {
}
}