From 6e126dc08d4d53d1d37159b17a33dde1f88e5228 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Mon, 29 Sep 2025 22:21:09 +0200 Subject: [PATCH] lock: option to launch on startup (#2076) --- .config/quickshell/ii/GlobalStates.qml | 9 +++++++++ .config/quickshell/ii/modules/common/Config.qml | 1 + .../quickshell/ii/modules/settings/InterfaceConfig.qml | 8 ++++++++ 3 files changed, 18 insertions(+) diff --git a/.config/quickshell/ii/GlobalStates.qml b/.config/quickshell/ii/GlobalStates.qml index 207b23fe3..c9cd602d6 100644 --- a/.config/quickshell/ii/GlobalStates.qml +++ b/.config/quickshell/ii/GlobalStates.qml @@ -27,6 +27,15 @@ Singleton { property bool superReleaseMightTrigger: true property bool workspaceShowNumbers: false + Connections { + target: Config + function onReadyChanged() { + if (Config.ready && Config.options.lock.launchOnStartup) { + GlobalStates.screenLocked = true; + } + } + } + property real screenZoom: 1 onScreenZoomChanged: { Quickshell.execDetached(["hyprctl", "keyword", "cursor:zoom_factor", root.screenZoom.toString()]); diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index e7b595d44..b59cc31dc 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -260,6 +260,7 @@ Singleton { } property JsonObject lock: JsonObject { + property bool launchOnStartup: false property JsonObject blur: JsonObject { property bool enable: false property real radius: 100 diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index e79a40779..76bd43b93 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -167,6 +167,14 @@ ContentPage { icon: "lock" title: Translation.tr("Lock screen") + ConfigSwitch { + text: Translation.tr('Launch on startup') + checked: Config.options.lock.launchOnStartup + onCheckedChanged: { + Config.options.lock.launchOnStartup = checked; + } + } + ContentSubsection { title: Translation.tr("Blurred style")