From ef71ae8afd4a5a30925b26ebe933a0c99ceb8050 Mon Sep 17 00:00:00 2001 From: zach Date: Sun, 24 May 2026 19:28:02 +0200 Subject: [PATCH 1/2] button to install colorscheme and wallpaper to greeter in settings --- Modules/Settings/Categories/Lockscreen.qml | 12 +++ .../Settings/Categories/Lockscreen/Idle.qml | 22 ++++- .../Settings/Controls/SettingsIconButton.qml | 83 +++++++++++++++++++ 3 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 Modules/Settings/Controls/SettingsIconButton.qml diff --git a/Modules/Settings/Categories/Lockscreen.qml b/Modules/Settings/Categories/Lockscreen.qml index 50c93db..d08b8a1 100644 --- a/Modules/Settings/Categories/Lockscreen.qml +++ b/Modules/Settings/Categories/Lockscreen.qml @@ -103,6 +103,18 @@ SettingsPage { } } + SettingsSection { + sectionId: "Greeter" + + SettingsHeader { + name: "Greeter" + } + + SettingsIconButton { + name: "Install wallpaper and color scheme to greeter" + } + } + SettingsSection { sectionId: "Idle" diff --git a/Modules/Settings/Categories/Lockscreen/Idle.qml b/Modules/Settings/Categories/Lockscreen/Idle.qml index c431fa0..7e43721 100644 --- a/Modules/Settings/Categories/Lockscreen/Idle.qml +++ b/Modules/Settings/Categories/Lockscreen/Idle.qml @@ -9,6 +9,8 @@ import qs.Modules.Settings.Controls ColumnLayout { id: root + property bool shouldBeActive: true + function addTimeoutEntry() { let list = [...Config.general.idle.timeouts]; @@ -40,8 +42,26 @@ ColumnLayout { Config.save(); } - Layout.fillWidth: true + anchors.left: parent.left + anchors.right: parent.right + height: shouldBeActive ? implicitHeight : 0 + opacity: shouldBeActive ? 1 : 0 + scale: shouldBeActive ? 1 : 0.8 spacing: Appearance.spacing.smaller + visible: opacity > 0 + + Behavior on opacity { + Anim { + } + } + Behavior on scale { + Anim { + } + } + Behavior on y { + Anim { + } + } Settings { name: "Idle Monitors" diff --git a/Modules/Settings/Controls/SettingsIconButton.qml b/Modules/Settings/Controls/SettingsIconButton.qml new file mode 100644 index 0000000..5f6673d --- /dev/null +++ b/Modules/Settings/Controls/SettingsIconButton.qml @@ -0,0 +1,83 @@ +import Quickshell +import QtQuick +import QtQuick.Layouts +import qs.Paths +import qs.Components +import qs.Config +import qs.Helpers + +Item { + id: root + + property alias button: iButton + readonly property bool highlighted: SettingsHighlight.highlightedSetting === name + required property string name + property bool shouldBeActive: true + + anchors.left: parent.left + anchors.right: parent.right + implicitHeight: shouldBeActive ? row.implicitHeight + Appearance.padding.smaller * 2 : 0 + opacity: shouldBeActive ? 1 : 0 + scale: shouldBeActive ? 1 : 0.8 + visible: opacity > 0 + + Behavior on opacity { + Anim { + } + } + Behavior on scale { + Anim { + } + } + Behavior on y { + Anim { + } + } + + Rectangle { + anchors.fill: parent + anchors.margins: -Appearance.padding.smaller + color: DynamicColors.palette.m3primaryContainer + opacity: root.highlighted ? 0.5 : 0 + radius: Appearance.rounding.small + + Behavior on opacity { + Anim { + duration: Appearance.anim.durations.normal + } + } + } + + RowLayout { + id: row + + anchors.left: parent.left + anchors.margins: Appearance.padding.small + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + + CustomText { + id: text + + Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter + Layout.fillWidth: true + font.pointSize: Appearance.font.size.larger + text: root.name + } + + IconButton { + id: iButton + + Layout.alignment: Qt.AlignRight | Qt.AlignVCenter + icon: "download" + + onClicked: { + const lockBg = `${Paths.state}/lockscreen_bg.png`; + const scheme = `${Paths.state}/scheme.json`; + const face = `${Paths.home}/.face`; + const destination = "/etc/zshell-greeter/images"; + Quickshell.execDetached(["pkexec", "sh", "-c", `mkdir -p ${destination}; cp ${lockBg} ${destination}; cp ${scheme} /etc/zshell-greeter; cp ${face} ${destination}`]); + } + } + } +} From 5097e30a779cfa0ef20df05ce6b70123e40cb9de Mon Sep 17 00:00:00 2001 From: zach Date: Sun, 24 May 2026 19:33:06 +0200 Subject: [PATCH 2/2] fix anchors used in Layouts --- Modules/Settings/Controls/SettingList.qml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Modules/Settings/Controls/SettingList.qml b/Modules/Settings/Controls/SettingList.qml index 6351c91..fad061f 100644 --- a/Modules/Settings/Controls/SettingList.qml +++ b/Modules/Settings/Controls/SettingList.qml @@ -194,6 +194,9 @@ Item { } Separator { + Layout.fillWidth: true + anchors.left: undefined + anchors.right: undefined } RowLayout { @@ -225,6 +228,9 @@ Item { } Separator { + Layout.fillWidth: true + anchors.left: undefined + anchors.right: undefined } Item {