From ced0f6efb14667e19cb05bb1c171f2244533f676 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Mon, 23 Jun 2025 01:35:08 +0200 Subject: [PATCH] settings: more options --- .../modules/settings/GeneralConfig.qml | 107 ++++++++++++++++++ .config/quickshell/settings.qml | 5 +- 2 files changed, 109 insertions(+), 3 deletions(-) diff --git a/.config/quickshell/modules/settings/GeneralConfig.qml b/.config/quickshell/modules/settings/GeneralConfig.qml index ae051836e..a696303f4 100644 --- a/.config/quickshell/modules/settings/GeneralConfig.qml +++ b/.config/quickshell/modules/settings/GeneralConfig.qml @@ -138,7 +138,114 @@ ContentPage { } } } + ConfigRow { + uniform: true + ConfigSwitch { + text: "Dark/Light toggle" + checked: ConfigOptions.bar.utilButtons.showDarkModeToggle + onCheckedChanged: { + ConfigLoader.setConfigValueAndSave("bar.utilButtons.showDarkModeToggle", checked); + } + } + ConfigSwitch { + opacity: 0 + enabled: false + } + } } + ContentSubsection { + title: "Workspaces" + tooltip: "Tip: Hide icons and always show numbers for\nthe classic illogical-impulse experience" + + ConfigRow { + uniform: true + ConfigSwitch { + text: 'Show app icons' + checked: ConfigOptions.bar.workspaces.showAppIcons + onCheckedChanged: { + ConfigLoader.setConfigValueAndSave("bar.workspaces.showAppIcons", checked); + } + } + ConfigSwitch { + text: 'Always show numbers' + checked: ConfigOptions.bar.workspaces.alwaysShowNumbers + onCheckedChanged: { + ConfigLoader.setConfigValueAndSave("bar.workspaces.alwaysShowNumbers", checked); + } + } + } + ConfigSpinBox { + text: "Workspaces shown" + value: ConfigOptions.bar.workspaces.shown + from: 1 + to: 30 + stepSize: 1 + onValueChanged: { + ConfigLoader.setConfigValueAndSave("bar.workspaces.shown", value); + } + } + ConfigSpinBox { + text: "Number show delay when pressing Super (ms)" + value: ConfigOptions.bar.workspaces.showNumberDelay + from: 0 + to: 1000 + stepSize: 50 + onValueChanged: { + ConfigLoader.setConfigValueAndSave("bar.workspaces.showNumberDelay", value); + } + } + } + } + + ContentSection { + title: "Battery" + + ConfigRow { + uniform: true + ConfigSpinBox { + text: "Low warning" + value: ConfigOptions.battery.low + from: 0 + to: 100 + stepSize: 5 + onValueChanged: { + ConfigLoader.setConfigValueAndSave("battery.low", value); + } + } + ConfigSpinBox { + text: "Critical warning" + value: ConfigOptions.battery.critical + from: 0 + to: 100 + stepSize: 5 + onValueChanged: { + ConfigLoader.setConfigValueAndSave("battery.critical", value); + } + } + } + ConfigRow { + uniform: false + ConfigSwitch { + text: "Automatic suspend" + checked: ConfigOptions.battery.automaticSuspend + onCheckedChanged: { + ConfigLoader.setConfigValueAndSave("battery.automaticSuspend", checked); + } + StyledToolTip { + content: "Automatically suspends the system when battery is low" + } + } + ConfigSpinBox { + text: "Suspend at" + value: ConfigOptions.battery.suspend + from: 0 + to: 100 + stepSize: 5 + onValueChanged: { + ConfigLoader.setConfigValueAndSave("battery.suspend", value); + } + } + } } } \ No newline at end of file diff --git a/.config/quickshell/settings.qml b/.config/quickshell/settings.qml index 00f07e2ff..618023638 100644 --- a/.config/quickshell/settings.qml +++ b/.config/quickshell/settings.qml @@ -56,8 +56,8 @@ ApplicationWindow { minimumWidth: 600 minimumHeight: 400 - width: 900 - height: 650 + width: 1100 + height: 750 color: Appearance.m3colors.m3background ColumnLayout { @@ -67,7 +67,6 @@ ApplicationWindow { } Keys.onPressed: (event) => { - console.log(`Key pressed: ${event.key}, Modifiers: ${event.modifiers}`); if (event.modifiers === Qt.ControlModifier) { if (event.key === Qt.Key_PageDown) { root.currentPage = Math.min(root.currentPage + 1, root.pages.length - 1)