From 06ebc4ffbf80b363e1a4f79e87f6f55ddf70d336 Mon Sep 17 00:00:00 2001 From: zach Date: Mon, 25 May 2026 11:51:16 +0200 Subject: [PATCH] remove irrelevant settings options plus bugfixes --- Helpers/Searcher.qml | 3 +- Modules/Osd/Content.qml | 14 +- Modules/Settings/Categories/Dashboard.qml | 222 ++++++++--------- .../Settings/Categories/Lockscreen/Idle.qml | 2 + Modules/Settings/Categories/Utilities.qml | 194 +++++++-------- .../Settings/Controls/SettingActionList.qml | 11 + .../Settings/Controls/SettingAliasList.qml | 228 +++++++++--------- shell.qml | 2 +- 8 files changed, 352 insertions(+), 324 deletions(-) diff --git a/Helpers/Searcher.qml b/Helpers/Searcher.qml index 5bfdef5..c6f5016 100644 --- a/Helpers/Searcher.qml +++ b/Helpers/Searcher.qml @@ -1,11 +1,12 @@ -import Quickshell import "../scripts/fzf.js" as Fzf import "../scripts/fuzzysort.js" as Fuzzy import QtQuick +import Quickshell Singleton { property var extraOpts: ({}) readonly property list fuzzyPrepped: useFuzzy ? list.map(e => { + console.log(useFuzzy); const obj = { _item: e }; diff --git a/Modules/Osd/Content.qml b/Modules/Osd/Content.qml index 04d5b1b..ef5ce62 100644 --- a/Modules/Osd/Content.qml +++ b/Modules/Osd/Content.qml @@ -100,12 +100,14 @@ Item { icon: `brightness_${(Math.round(value * 6) + 1)}` value: root.brightness - onMoved: { - if (Config.osd.allMonBrightness) { - root.monitor?.setBrightness(value); - } else { - for (const mon of Brightness.monitors) { - mon.setBrightness(value); + onPressedChanged: { + if (!pressed) { + if (Config.osd.allMonBrightness) { + for (const mon of Brightness.monitors) { + mon.setBrightness(value); + } + } else { + root.monitor?.setBrightness(value); } } } diff --git a/Modules/Settings/Categories/Dashboard.qml b/Modules/Settings/Categories/Dashboard.qml index dabb37e..1e9ad84 100644 --- a/Modules/Settings/Categories/Dashboard.qml +++ b/Modules/Settings/Categories/Dashboard.qml @@ -19,8 +19,8 @@ SettingsPage { } SettingSpinBox { - name: "Media update interval" min: 0 + name: "Media update interval" object: Config.dashboard setting: "mediaUpdateInterval" step: 50 @@ -30,8 +30,8 @@ SettingsPage { } SettingSpinBox { - name: "Resource update interval" min: 0 + name: "Resource update interval" object: Config.dashboard setting: "resourceUpdateInterval" step: 50 @@ -41,8 +41,8 @@ SettingsPage { } SettingSpinBox { - name: "Drag threshold" min: 0 + name: "Drag threshold" object: Config.dashboard setting: "dragThreshold" } @@ -107,112 +107,112 @@ SettingsPage { } } - SettingsSection { - sectionId: "Layout Sizes" - - SettingsHeader { - name: "Layout Sizes" - } - - SettingReadOnly { - name: "Tab indicator height" - value: String(Config.dashboard.sizes.tabIndicatorHeight) - } - - Separator { - } - - SettingReadOnly { - name: "Tab indicator spacing" - value: String(Config.dashboard.sizes.tabIndicatorSpacing) - } - - Separator { - } - - SettingReadOnly { - name: "Info width" - value: String(Config.dashboard.sizes.infoWidth) - } - - Separator { - } - - SettingReadOnly { - name: "Info icon size" - value: String(Config.dashboard.sizes.infoIconSize) - } - - Separator { - } - - SettingReadOnly { - name: "Date time width" - value: String(Config.dashboard.sizes.dateTimeWidth) - } - - Separator { - } - - SettingReadOnly { - name: "Media width" - value: String(Config.dashboard.sizes.mediaWidth) - } - - Separator { - } - - SettingReadOnly { - name: "Media progress sweep" - value: String(Config.dashboard.sizes.mediaProgressSweep) - } - - Separator { - } - - SettingReadOnly { - name: "Media progress thickness" - value: String(Config.dashboard.sizes.mediaProgressThickness) - } - - Separator { - } - - SettingReadOnly { - name: "Resource progress thickness" - value: String(Config.dashboard.sizes.resourceProgessThickness) - } - - Separator { - } - - SettingReadOnly { - name: "Weather width" - value: String(Config.dashboard.sizes.weatherWidth) - } - - Separator { - } - - SettingReadOnly { - name: "Media cover art size" - value: String(Config.dashboard.sizes.mediaCoverArtSize) - } - - Separator { - } - - SettingReadOnly { - name: "Media visualiser size" - value: String(Config.dashboard.sizes.mediaVisualiserSize) - } - - Separator { - } - - SettingReadOnly { - name: "Resource size" - value: String(Config.dashboard.sizes.resourceSize) - } - } + // SettingsSection { + // sectionId: "Layout Sizes" + // + // SettingsHeader { + // name: "Layout Sizes" + // } + // + // SettingReadOnly { + // name: "Tab indicator height" + // value: String(Config.dashboard.sizes.tabIndicatorHeight) + // } + // + // Separator { + // } + // + // SettingReadOnly { + // name: "Tab indicator spacing" + // value: String(Config.dashboard.sizes.tabIndicatorSpacing) + // } + // + // Separator { + // } + // + // SettingReadOnly { + // name: "Info width" + // value: String(Config.dashboard.sizes.infoWidth) + // } + // + // Separator { + // } + // + // SettingReadOnly { + // name: "Info icon size" + // value: String(Config.dashboard.sizes.infoIconSize) + // } + // + // Separator { + // } + // + // SettingReadOnly { + // name: "Date time width" + // value: String(Config.dashboard.sizes.dateTimeWidth) + // } + // + // Separator { + // } + // + // SettingReadOnly { + // name: "Media width" + // value: String(Config.dashboard.sizes.mediaWidth) + // } + // + // Separator { + // } + // + // SettingReadOnly { + // name: "Media progress sweep" + // value: String(Config.dashboard.sizes.mediaProgressSweep) + // } + // + // Separator { + // } + // + // SettingReadOnly { + // name: "Media progress thickness" + // value: String(Config.dashboard.sizes.mediaProgressThickness) + // } + // + // Separator { + // } + // + // SettingReadOnly { + // name: "Resource progress thickness" + // value: String(Config.dashboard.sizes.resourceProgessThickness) + // } + // + // Separator { + // } + // + // SettingReadOnly { + // name: "Weather width" + // value: String(Config.dashboard.sizes.weatherWidth) + // } + // + // Separator { + // } + // + // SettingReadOnly { + // name: "Media cover art size" + // value: String(Config.dashboard.sizes.mediaCoverArtSize) + // } + // + // Separator { + // } + // + // SettingReadOnly { + // name: "Media visualiser size" + // value: String(Config.dashboard.sizes.mediaVisualiserSize) + // } + // + // Separator { + // } + // + // SettingReadOnly { + // name: "Resource size" + // value: String(Config.dashboard.sizes.resourceSize) + // } + // } } diff --git a/Modules/Settings/Categories/Lockscreen/Idle.qml b/Modules/Settings/Categories/Lockscreen/Idle.qml index 7e43721..43ea412 100644 --- a/Modules/Settings/Categories/Lockscreen/Idle.qml +++ b/Modules/Settings/Categories/Lockscreen/Idle.qml @@ -72,6 +72,8 @@ ColumnLayout { SettingList { Layout.fillWidth: true + anchors.left: undefined + anchors.right: undefined onAddActiveActionRequested: { root.updateTimeoutEntry(index, "activeAction", ""); diff --git a/Modules/Settings/Categories/Utilities.qml b/Modules/Settings/Categories/Utilities.qml index 0fb6bcd..a40af60 100644 --- a/Modules/Settings/Categories/Utilities.qml +++ b/Modules/Settings/Categories/Utilities.qml @@ -19,8 +19,8 @@ SettingsPage { } SettingSpinBox { - name: "Max toasts" min: 1 + name: "Max toasts" object: Config.utilities setting: "maxToasts" } @@ -29,8 +29,8 @@ SettingsPage { } SettingSpinBox { - name: "Panel width" min: 1 + name: "Panel width" object: Config.utilities.sizes setting: "width" } @@ -39,8 +39,8 @@ SettingsPage { } SettingSpinBox { - name: "Toast width" min: 1 + name: "Toast width" object: Config.utilities.sizes setting: "toastWidth" } @@ -77,100 +77,100 @@ SettingsPage { setting: "gameModeChanged" } - Separator { - } - - SettingSwitch { - name: "Do not disturb changed" - object: Config.utilities.toasts - setting: "dndChanged" - } - - Separator { - } - - SettingSwitch { - name: "Audio output changed" - object: Config.utilities.toasts - setting: "audioOutputChanged" - } - - Separator { - } - - SettingSwitch { - name: "Audio input changed" - object: Config.utilities.toasts - setting: "audioInputChanged" - } - - Separator { - } - - SettingSwitch { - name: "Caps lock changed" - object: Config.utilities.toasts - setting: "capsLockChanged" - } - - Separator { - } - - SettingSwitch { - name: "Num lock changed" - object: Config.utilities.toasts - setting: "numLockChanged" - } - - Separator { - } - - SettingSwitch { - name: "Keyboard layout changed" - object: Config.utilities.toasts - setting: "kbLayoutChanged" - } - - Separator { - } - - SettingSwitch { - name: "VPN changed" - object: Config.utilities.toasts - setting: "vpnChanged" - } - - Separator { - } - - SettingSwitch { - name: "Now playing" - object: Config.utilities.toasts - setting: "nowPlaying" - } + // Separator { + // } + // + // SettingSwitch { + // name: "Do not disturb changed" + // object: Config.utilities.toasts + // setting: "dndChanged" + // } + // + // Separator { + // } + // + // SettingSwitch { + // name: "Audio output changed" + // object: Config.utilities.toasts + // setting: "audioOutputChanged" + // } + // + // Separator { + // } + // + // SettingSwitch { + // name: "Audio input changed" + // object: Config.utilities.toasts + // setting: "audioInputChanged" + // } + // + // Separator { + // } + // + // SettingSwitch { + // name: "Caps lock changed" + // object: Config.utilities.toasts + // setting: "capsLockChanged" + // } + // + // Separator { + // } + // + // SettingSwitch { + // name: "Num lock changed" + // object: Config.utilities.toasts + // setting: "numLockChanged" + // } + // + // Separator { + // } + // + // SettingSwitch { + // name: "Keyboard layout changed" + // object: Config.utilities.toasts + // setting: "kbLayoutChanged" + // } + // + // Separator { + // } + // + // SettingSwitch { + // name: "VPN changed" + // object: Config.utilities.toasts + // setting: "vpnChanged" + // } + // + // Separator { + // } + // + // SettingSwitch { + // name: "Now playing" + // object: Config.utilities.toasts + // setting: "nowPlaying" + // } } - SettingsSection { - sectionId: "VPN" - - SettingsHeader { - name: "VPN" - } - - SettingSwitch { - name: "Enable VPN integration" - object: Config.utilities.vpn - setting: "enabled" - } - - Separator { - } - - SettingStringList { - name: "Provider" - addLabel: qsTr("Add VPN provider") - object: Config.utilities.vpn - setting: "provider" - } - } + // SettingsSection { + // sectionId: "VPN" + // + // SettingsHeader { + // name: "VPN" + // } + // + // SettingSwitch { + // name: "Enable VPN integration" + // object: Config.utilities.vpn + // setting: "enabled" + // } + // + // Separator { + // } + // + // SettingStringList { + // name: "Provider" + // addLabel: qsTr("Add VPN provider") + // object: Config.utilities.vpn + // setting: "provider" + // } + // } } diff --git a/Modules/Settings/Controls/SettingActionList.qml b/Modules/Settings/Controls/SettingActionList.qml index af32bb1..373e021 100644 --- a/Modules/Settings/Controls/SettingActionList.qml +++ b/Modules/Settings/Controls/SettingActionList.qml @@ -127,6 +127,9 @@ ColumnLayout { } Separator { + Layout.fillWidth: true + anchors.left: undefined + anchors.right: undefined } RowLayout { @@ -207,6 +210,8 @@ ColumnLayout { StringListEditor { Layout.fillWidth: true addLabel: qsTr("Add command argument") + anchors.left: undefined + anchors.right: undefined values: [...(modelData.command ?? [])] onListEdited: function (values) { @@ -215,6 +220,9 @@ ColumnLayout { } Separator { + Layout.fillWidth: true + anchors.left: undefined + anchors.right: undefined } RowLayout { @@ -233,6 +241,9 @@ ColumnLayout { } Separator { + Layout.fillWidth: true + anchors.left: undefined + anchors.right: undefined } RowLayout { diff --git a/Modules/Settings/Controls/SettingAliasList.qml b/Modules/Settings/Controls/SettingAliasList.qml index bfdb215..908dc29 100644 --- a/Modules/Settings/Controls/SettingAliasList.qml +++ b/Modules/Settings/Controls/SettingAliasList.qml @@ -6,7 +6,7 @@ import qs.Components import qs.Config import qs.Helpers -ColumnLayout { +CustomRect { id: root readonly property bool highlighted: SettingsHighlight.highlightedSetting === name @@ -43,10 +43,9 @@ ColumnLayout { anchors.left: parent.left anchors.right: parent.right - height: shouldBeActive ? implicitHeight : 0 + height: shouldBeActive ? layout.implicitHeight : 0 opacity: shouldBeActive ? 1 : 0 scale: shouldBeActive ? 1 : 0.8 - spacing: Appearance.spacing.smaller visible: opacity > 0 Behavior on opacity { @@ -77,115 +76,128 @@ ColumnLayout { } } - CustomText { - Layout.fillWidth: true - font.pointSize: Appearance.font.size.larger - text: root.name - } + ColumnLayout { + id: layout - Repeater { - model: [...root.object[root.setting]] - - Item { - required property int index - required property var modelData - - Layout.fillWidth: true - Layout.preferredHeight: layout.implicitHeight + Appearance.padding.smaller * 2 - - CustomRect { - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - anchors.topMargin: -(Appearance.spacing.smaller / 2) - color: DynamicColors.tPalette.m3outlineVariant - implicitHeight: 1 - visible: index !== 0 - } - - ColumnLayout { - id: layout - - anchors.left: parent.left - anchors.margins: Appearance.padding.small - anchors.right: parent.right - anchors.verticalCenter: parent.verticalCenter - spacing: Appearance.spacing.small - - RowLayout { - Layout.fillWidth: true - - CustomText { - Layout.fillWidth: true - text: qsTr("From") - } - - CustomRect { - Layout.fillWidth: true - Layout.preferredHeight: 33 - color: DynamicColors.tPalette.m3surfaceContainerHigh - radius: Appearance.rounding.full - - CustomTextField { - anchors.fill: parent - anchors.leftMargin: Appearance.padding.normal - anchors.rightMargin: Appearance.padding.normal - text: modelData.from ?? "" - - onEditingFinished: root.updateAlias(index, "from", text) - } - } - - IconButton { - font.pointSize: Appearance.font.size.large - icon: "delete" - type: IconButton.Tonal - - onClicked: root.removeAlias(index) - } - } - - RowLayout { - Layout.fillWidth: true - - CustomText { - Layout.fillWidth: true - text: qsTr("To") - } - - CustomRect { - Layout.fillWidth: true - Layout.preferredHeight: 33 - color: DynamicColors.tPalette.m3surface - radius: Appearance.rounding.small - - CustomTextField { - anchors.fill: parent - anchors.leftMargin: Appearance.padding.normal - anchors.rightMargin: Appearance.padding.normal - text: modelData.to ?? "" - - onEditingFinished: root.updateAlias(index, "to", text) - } - } - } - } - } - } - - RowLayout { - Layout.fillWidth: true - - IconButton { - font.pointSize: Appearance.font.size.large - icon: "add" - - onClicked: root.addAlias() - } + anchors.left: parent.left + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + spacing: Appearance.spacing.smaller CustomText { Layout.fillWidth: true - text: qsTr("Add alias") + font.pointSize: Appearance.font.size.larger + text: root.name + } + + Repeater { + model: [...root.object[root.setting]] + + Item { + required property int index + required property var modelData + + Layout.fillWidth: true + Layout.preferredHeight: layout.implicitHeight + Appearance.padding.smaller * 2 + + CustomRect { + anchors.left: parent.left + anchors.right: parent.right + anchors.top: parent.top + anchors.topMargin: -(Appearance.spacing.smaller / 2) + color: DynamicColors.tPalette.m3outlineVariant + implicitHeight: 1 + visible: index !== 0 + } + + ColumnLayout { + id: layout + + anchors.left: parent.left + anchors.margins: Appearance.padding.small + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + spacing: Appearance.spacing.small + + RowLayout { + Layout.fillWidth: true + + CustomText { + Layout.fillWidth: true + text: qsTr("From") + } + + CustomRect { + Layout.preferredHeight: 33 + Layout.preferredWidth: Math.max(Math.min(fromTextField.contentWidth + Appearance.padding.large * 2, 550), 50) + color: DynamicColors.tPalette.m3surfaceContainerHigh + radius: Appearance.rounding.full + + CustomTextField { + id: fromTextField + + anchors.centerIn: parent + horizontalAlignment: Text.AlignHCenter + implicitWidth: Math.min(contentWidth + Appearance.padding.normal * 2, 550) + text: modelData.from ?? "" + + onEditingFinished: root.updateAlias(index, "from", text) + } + } + + IconButton { + font.pointSize: Appearance.font.size.large + icon: "delete" + type: IconButton.Tonal + + onClicked: root.removeAlias(index) + } + } + + RowLayout { + Layout.fillWidth: true + + CustomText { + Layout.fillWidth: true + text: qsTr("To") + } + + CustomRect { + Layout.preferredHeight: 33 + Layout.preferredWidth: Math.max(Math.min(toTextField.contentWidth + Appearance.padding.large * 2, 550), 50) + color: DynamicColors.tPalette.m3surfaceContainerHigh + radius: Appearance.rounding.full + + CustomTextField { + id: toTextField + + anchors.centerIn: parent + horizontalAlignment: Text.AlignHCenter + implicitWidth: Math.min(contentWidth + Appearance.padding.normal * 2, 550) + text: modelData.to ?? "" + + onEditingFinished: root.updateAlias(index, "to", text) + } + } + } + } + } + } + + RowLayout { + Layout.fillWidth: true + + IconButton { + font.pointSize: Appearance.font.size.large + icon: "add" + + onClicked: root.addAlias() + } + + CustomText { + Layout.fillWidth: true + text: qsTr("Add alias") + } } } } diff --git a/shell.qml b/shell.qml index bc06a34..90f6efa 100644 --- a/shell.qml +++ b/shell.qml @@ -1,6 +1,6 @@ //@ pragma UseQApplication //@ pragma Env QSG_RENDER_LOOP=threaded -// @ pragma Env QSG_RHI_BACKEND=vulkan +//@ pragma Env QSG_RHI_BACKEND=vulkan //@ pragma Env QSG_NO_VSYNC=1 //@ pragma Env QS_NO_RELOAD_POPUP=1 //@ pragma Env QT_SCALE_FACTOR_ROUNDING_POLICY=Round