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")