From 476755fc18646a0a28320342f83690c0d77b8724 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 4 Oct 2025 09:55:57 +0200 Subject: [PATCH] settings: add toggles for lock screen security options --- .../ii/modules/settings/InterfaceConfig.qml | 61 +++++++++++++++---- 1 file changed, 48 insertions(+), 13 deletions(-) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 76bd43b93..6f1c31571 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -96,7 +96,7 @@ ContentPage { ContentSection { icon: "point_scan" - title: Translation.tr("Crosshair") + title: Translation.tr("Crosshair overlay") MaterialTextArea { Layout.fillWidth: true @@ -109,6 +109,12 @@ ContentPage { } RowLayout { + StyledText { + Layout.leftMargin: 10 + color: Appearance.colors.colSubtext + font.pixelSize: Appearance.font.pixelSize.smallie + text: Translation.tr("Press Super+G to toggle appearance") + } Item { Layout.fillWidth: true } RippleButtonWithIcon { id: editorButton @@ -176,26 +182,33 @@ ContentPage { } ContentSubsection { - title: Translation.tr("Blurred style") + title: Translation.tr("Security") ConfigSwitch { - text: Translation.tr('Enable blur') - checked: Config.options.lock.blur.enable + text: Translation.tr('Require password to power off/restart') + checked: Config.options.lock.security.requirePasswordToPower onCheckedChanged: { - Config.options.lock.blur.enable = checked; + Config.options.lock.security.requirePasswordToPower = checked; + } + StyledToolTip { + text: Translation.tr("Remember that on most devices one can always hold the power button to force shutdown\nThis only makes it a tiny bit harder for accidents to happen") } } - ConfigSpinBox { - text: Translation.tr("Blur: Extra zoom (%)") - value: Config.options.lock.blur.extraZoom * 100 - from: 1 - to: 150 - stepSize: 2 - onValueChanged: { - Config.options.lock.blur.extraZoom = value / 100; + ConfigSwitch { + text: Translation.tr('Also unlock keyring') + checked: Config.options.lock.security.unlockKeyring + onCheckedChanged: { + Config.options.lock.security.unlockKeyring = checked; + } + StyledToolTip { + text: Translation.tr("This is usually safe and needed for your browser and AI sidebar anyway\nMostly useful for those who use lock on startup instead of a display manager that does it (GDM, SDDM, etc.)") } } + } + + ContentSubsection { + title: Translation.tr("Style: general") ConfigSwitch { text: Translation.tr('Center clock') @@ -212,6 +225,28 @@ ContentPage { Config.options.lock.showLockedText = checked; } } + } + ContentSubsection { + title: Translation.tr("Style: Blurred") + + ConfigSwitch { + text: Translation.tr('Enable blur') + checked: Config.options.lock.blur.enable + onCheckedChanged: { + Config.options.lock.blur.enable = checked; + } + } + + ConfigSpinBox { + text: Translation.tr("Extra wallpaper zoom (%)") + value: Config.options.lock.blur.extraZoom * 100 + from: 1 + to: 150 + stepSize: 2 + onValueChanged: { + Config.options.lock.blur.extraZoom = value / 100; + } + } }