add option to use hyprlock instead of quickshell

This commit is contained in:
end-4
2025-10-13 12:16:42 +02:00
parent b0cfcaff3d
commit 02192368d2
4 changed files with 36 additions and 17 deletions
@@ -112,6 +112,10 @@ Scope {
description: "Locks the screen"
onPressed: {
if (Config.options.lock.useHyprlock) {
Quickshell.execDetached(["hyprlock"])
return;
}
GlobalStates.screenLocked = true;
}
}
@@ -125,4 +129,23 @@ Scope {
lockContext.shouldReFocus();
}
}
Connections {
target: Config
function onReadyChanged() {
print("lock after config")
if (Config.options.lock.launchOnStartup && Config.ready && Persistent.ready && Persistent.isNewHyprlandInstance) {
Hyprland.dispatch("global quickshell:lock")
}
}
}
Connections {
target: Persistent
function onReadyChanged() {
print("lock after persistent")
if (Config.options.lock.launchOnStartup && Config.ready && Persistent.ready && Persistent.isNewHyprlandInstance) {
Hyprland.dispatch("global quickshell:lock")
}
}
}
}