From daa671c6a528e037539d5b2ac689db8605ea61bc Mon Sep 17 00:00:00 2001 From: Madjid Taha Date: Sat, 25 Oct 2025 00:42:28 +0200 Subject: [PATCH 01/44] feat: add custom super key icon, mac symbol for mods keys and icon for function keys --- .../modules/cheatsheet/CheatsheetKeybinds.qml | 46 +++++-- .../quickshell/ii/modules/common/Config.qml | 10 ++ .../ii/modules/settings/AdvancedConfig.qml | 115 ++++++++++++++++++ 3 files changed, 163 insertions(+), 8 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml index 0cf6d40c8..521522530 100644 --- a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml +++ b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml @@ -14,18 +14,48 @@ Item { property real padding: 4 implicitWidth: row.implicitWidth + padding * 2 implicitHeight: row.implicitHeight + padding * 2 - + property list superMap: [ + "󰖳", "󰌽", "󰘳", "", "󰨡", "", "", + "󰣇", "", "", "", "", " ", "", "󱄛" + ] property var keyBlacklist: ["Super_L"] property var keySubstitutions: ({ - "Super": "󰖳", - "mouse_up": "Scroll ↓", // ikr, weird - "mouse_down": "Scroll ↑", // trust me bro - "mouse:272": "LMB", - "mouse:273": "RMB", + "Super": superMap[Config.options.appearance.keybinds.superKey], + "Ctrl": Config.options.appearance.keybinds.useMacSymbol ? "󰘴" : "Ctrl", + "Alt": Config.options.appearance.keybinds.useMacSymbol ? "󰘵" : "Alt", + "Shift": Config.options.appearance.keybinds.useMacSymbol ? "󰘶" : "Shift", + "Space": Config.options.appearance.keybinds.useMacSymbol ? "󱁐" : "Space", + "Tab": Config.options.appearance.keybinds.useMacSymbol ? "" : "Tab", + "Equal": Config.options.appearance.keybinds.useMacSymbol ? "󰇼" : "Equal", + "Minus": Config.options.appearance.keybinds.useMacSymbol ? "" : "Minus", + "Print": Config.options.appearance.keybinds.useMacSymbol ? "" : "Print", + "Delete": Config.options.appearance.keybinds.useMacSymbol ? "󰭜" : "Delete", + "Return": Config.options.appearance.keybinds.useMacSymbol ? "󰌑" : "Enter", + "Period": Config.options.appearance.keybinds.useMacSymbol ? "." : "Period", + + // Function keys + "Escape": Config.options.appearance.keybinds.useFnSymbol ? "󱊷" : "Escape", + "F1": Config.options.appearance.keybinds.useFnSymbol ? "󱊫" : "F1", + "F2": Config.options.appearance.keybinds.useFnSymbol ? "󱊬" : "F2", + "F3": Config.options.appearance.keybinds.useFnSymbol ? "󱊭" : "F3", + "F4": Config.options.appearance.keybinds.useFnSymbol ? "󱊮" : "F4", + "F5": Config.options.appearance.keybinds.useFnSymbol ? "󱊯" : "F5", + "F6": Config.options.appearance.keybinds.useFnSymbol ? "󱊰" : "F6", + "F7": Config.options.appearance.keybinds.useFnSymbol ? "󱊱" : "F7", + "F8": Config.options.appearance.keybinds.useFnSymbol ? "󱊲" : "F8", + "F9": Config.options.appearance.keybinds.useFnSymbol ? "󱊳" : "F9", + "F10": Config.options.appearance.keybinds.useFnSymbol ? "󱊴" : "F10", + "F11": Config.options.appearance.keybinds.useFnSymbol ? "󱊵" : "F11", + "F12": Config.options.appearance.keybinds.useFnSymbol ? "󱊶" : "F12", + + // Mouse keys + "mouse_up": Config.options.appearance.keybinds.useMouseSymbol ? "󱕐" : "Scroll ↓", // ikr, weird + "mouse_down": Config.options.appearance.keybinds.useMouseSymbol ? "󱕑" : "Scroll ↑", // trust me bro + "mouse:272": Config.options.appearance.keybinds.useMouseSymbol ? "L󰍽" : "LMB", + "mouse:273": Config.options.appearance.keybinds.useMouseSymbol ? "R󰍽" : "RMB", "mouse:275": "MouseBack", "Slash": "/", "Hash": "#", - "Return": "Enter", // "Shift": "", }) @@ -149,4 +179,4 @@ Item { } } -} \ No newline at end of file +} diff --git a/dots/.config/quickshell/ii/modules/common/Config.qml b/dots/.config/quickshell/ii/modules/common/Config.qml index 39c0ef131..dd4e1bc74 100644 --- a/dots/.config/quickshell/ii/modules/common/Config.qml +++ b/dots/.config/quickshell/ii/modules/common/Config.qml @@ -123,6 +123,16 @@ Singleton { property JsonObject palette: JsonObject { property string type: "auto" // Allowed: auto, scheme-content, scheme-expressive, scheme-fidelity, scheme-fruit-salad, scheme-monochrome, scheme-neutral, scheme-rainbow, scheme-tonal-spot } + property JsonObject keybinds: JsonObject { + // Use a nerdfont to see the icons + // 0: 󰖳 | 1: 󰌽 | 2: 󰘳 | 3:  | 4: 󰨡 + // 5:  | 6:  | 7: 󰣇 | 8:  | 9:  + // 10:  | 11:  | 12:  | 13:  | 14: 󱄛 + property int superKey: 0 + property bool useMacSymbol: false + property bool useMouseSymbol: false + property bool useFnSymbol: false + } } property JsonObject audio: JsonObject { diff --git a/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml b/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml index 811cf7ca6..4dc71faa2 100644 --- a/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml +++ b/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml @@ -90,4 +90,119 @@ ContentPage { } } + ContentSection { + icon: "keyboard" + title: Translation.tr("Keybinds Cheatsheet") + + ContentSubsection { + title: Translation.tr("Super Key Symbol") + ConfigSelectionArray { + currentValue: Config.options.appearance.keybinds.superKey + onSelected: newValue => { + Config.options.appearance.keybinds.superKey = newValue; + } + // Use a nerdfont to see the icons + // 0: 󰖳 | 1: 󰌽 | 2: 󰘳 | 3:  | 4: 󰨡 + // 5:  | 6:  | 7: 󰣇 | 8:  | 9:  + // 10:  | 11:  | 12:  | 13:  | 14: 󱄛 + options: [ + { + displayName: "󰖳", + icon: "", + value: 0 + }, + { + displayName: "", + icon: "", + value: 3 + }, + { + displayName: "󰨡", + icon: "", + value: 4 + }, + { + displayName: "", + icon: "", + value: 5 + }, + { + displayName: "󰣇", + icon: "", + value: 7 + }, + { + displayName: "", + icon: "", + value: 12 + }, + { + displayName: "", + icon: "", + value: 13 + }, + { + displayName: "", + icon: "", + value: 11 + }, + { + displayName: "", + icon: "", + value: 10 + }, + { + displayName: "", + icon: "", + value: 8 + }, + { + displayName: "󱄛", + icon: "", + value: 14 + }, + { + displayName: "", + icon: "", + value: 9 + }, + { + displayName: "", + icon: "", + value: 6 + }, + { + displayName: "󰘳", + icon: "", + value: 2 + }, + ] + } + } + + ConfigSwitch { + buttonIcon: "󰘵" + text: Translation.tr("Use macOS-like symbols for mods keys") + checked: Config.options.appearance.keybinds.useMacSymbol + onCheckedChanged: { + Config.options.appearance.keybinds.useMacSymbol = checked; + } + } + ConfigSwitch { + buttonIcon: "󱊶" + text: Translation.tr("Use symbols for function keys") + checked: Config.options.appearance.keybinds.useFnSymbol + onCheckedChanged: { + Config.options.appearance.keybinds.useFnSymbol = checked; + } + } + ConfigSwitch { + buttonIcon: "󰍽" + text: Translation.tr("Use symbols for mouse") + checked: Config.options.appearance.keybinds.s + onCheckedChanged: { + Config.options.appearance.keybinds.useMouseSymbol = checked; + } + } + } } From 3da64f6bc51f227870e9a20d9f8460f4c23e814e Mon Sep 17 00:00:00 2001 From: Madjid Taha Date: Sat, 25 Oct 2025 00:59:42 +0200 Subject: [PATCH 02/44] fix useMouseSymbol boolean typo --- dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml b/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml index 4dc71faa2..f126cc0d8 100644 --- a/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml +++ b/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml @@ -199,7 +199,7 @@ ContentPage { ConfigSwitch { buttonIcon: "󰍽" text: Translation.tr("Use symbols for mouse") - checked: Config.options.appearance.keybinds.s + checked: Config.options.appearance.keybinds.useMouseSymbol onCheckedChanged: { Config.options.appearance.keybinds.useMouseSymbol = checked; } From 8c125cccb1036ea523e8f843c4ae0dbc5cb9f6df Mon Sep 17 00:00:00 2001 From: Madjid Taha Date: Sat, 25 Oct 2025 01:45:42 +0200 Subject: [PATCH 03/44] add other symbols --- .../quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml index 521522530..8d2d058ea 100644 --- a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml +++ b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml @@ -53,6 +53,8 @@ Item { "mouse_down": Config.options.appearance.keybinds.useMouseSymbol ? "󱕑" : "Scroll ↑", // trust me bro "mouse:272": Config.options.appearance.keybinds.useMouseSymbol ? "L󰍽" : "LMB", "mouse:273": Config.options.appearance.keybinds.useMouseSymbol ? "R󰍽" : "RMB", + "Scroll ↑/↓": Config.options.appearance.keybinds.useMouseSymbol ? "󱕒" : "Scroll ↑/↓", + "Page_↑/↓": Config.options.appearance.keybinds.useMouseSymbol ? "Page " : "Page_↑/↓", "mouse:275": "MouseBack", "Slash": "/", "Hash": "#", From 533156e0d0d31ebe703490449fd2f66c7753142d Mon Sep 17 00:00:00 2001 From: Madjid Taha Date: Sat, 25 Oct 2025 04:22:01 +0200 Subject: [PATCH 04/44] cheatsheet add font size setting and macos like shortcut --- .../modules/cheatsheet/CheatsheetKeybinds.qml | 20 +++++- .../quickshell/ii/modules/common/Config.qml | 5 ++ .../ii/modules/common/widgets/KeyboardKey.qml | 3 +- .../ii/modules/settings/AdvancedConfig.qml | 66 ++++++++++++++----- 4 files changed, 75 insertions(+), 19 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml index 8d2d058ea..64d695547 100644 --- a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml +++ b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml @@ -106,6 +106,17 @@ Item { var result = []; for (var i = 0; i < keybindSection.modelData.keybinds.length; i++) { const keybind = keybindSection.modelData.keybinds[i]; + + if (Config.options.appearance.keybinds.useMacLikeShortcut) { + + for (var j = 0; j < keybind.mods.length; j++) { + keybind.mods[j] = keySubstitutions[keybind.mods[j]] || keybind.mods[j]; + } + keybind.mods = [keybind.mods.join(' ') ] + keybind.mods[0] += !keyBlacklist.includes(keybind.key) && keybind.mods[0].length ? ' ' : '' + keybind.mods[0] += !keyBlacklist.includes(keybind.key) ? (keySubstitutions[keybind.key] || keybind.key) : '' + } + result.push({ "type": "keys", "mods": keybind.mods, @@ -137,17 +148,19 @@ Item { delegate: KeyboardKey { required property var modelData key: keySubstitutions[modelData] || modelData + pixelSize: Config.options.appearance.keybinds.pixelSize.key } } StyledText { id: keybindPlus - visible: !keyBlacklist.includes(modelData.key) && modelData.mods.length > 0 + visible: !Config.options.appearance.keybinds.useMacLikeShortcut && !keyBlacklist.includes(modelData.key) && modelData.mods.length > 0 text: "+" } KeyboardKey { id: keybindKey - visible: !keyBlacklist.includes(modelData.key) + visible: !Config.options.appearance.keybinds.useMacLikeShortcut && !keyBlacklist.includes(modelData.key) key: keySubstitutions[modelData.key] || modelData.key + pixelSize: Config.options.appearance.keybinds.pixelSize.key color: Appearance.colors.colOnLayer0 } } @@ -163,7 +176,8 @@ Item { StyledText { id: commentText anchors.centerIn: parent - font.pixelSize: Appearance.font.pixelSize.smaller + // font.pixelSize: Appearance.font.pixelSize.smaller + font.pixelSize: Config.options.appearance.keybinds.pixelSize.comment text: modelData.comment } } diff --git a/dots/.config/quickshell/ii/modules/common/Config.qml b/dots/.config/quickshell/ii/modules/common/Config.qml index dd4e1bc74..11526c81b 100644 --- a/dots/.config/quickshell/ii/modules/common/Config.qml +++ b/dots/.config/quickshell/ii/modules/common/Config.qml @@ -130,8 +130,13 @@ Singleton { // 10:  | 11:  | 12:  | 13:  | 14: 󱄛 property int superKey: 0 property bool useMacSymbol: false + property bool useMacLikeShortcut: false property bool useMouseSymbol: false property bool useFnSymbol: false + property JsonObject pixelSize: JsonObject { + property int key: Appearance.font.pixelSize.smaller + property int comment: Appareance.font.pixelSize.smaller + } } } diff --git a/dots/.config/quickshell/ii/modules/common/widgets/KeyboardKey.qml b/dots/.config/quickshell/ii/modules/common/widgets/KeyboardKey.qml index 14c75c62d..c769554ec 100644 --- a/dots/.config/quickshell/ii/modules/common/widgets/KeyboardKey.qml +++ b/dots/.config/quickshell/ii/modules/common/widgets/KeyboardKey.qml @@ -11,6 +11,7 @@ Rectangle { property real extraBottomBorderWidth: 2 property color borderColor: Appearance.colors.colOnLayer0 property real borderRadius: 5 + property int pixelSize: Appearance.font.pixelSize.smallie property color keyColor: Appearance.m3colors.m3surfaceContainerLow implicitWidth: keyFace.implicitWidth + borderWidth * 2 implicitHeight: keyFace.implicitHeight + borderWidth * 2 + extraBottomBorderWidth @@ -35,7 +36,7 @@ Rectangle { id: keyText anchors.centerIn: parent font.family: Appearance.font.family.monospace - font.pixelSize: Appearance.font.pixelSize.smaller + font.pixelSize: pixelSize text: key } } diff --git a/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml b/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml index f126cc0d8..103d5b8f2 100644 --- a/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml +++ b/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml @@ -1,6 +1,10 @@ import QtQuick +import Quickshell +import Quickshell.Io +import QtQuick.Layouts import qs.services import qs.modules.common +import qs.modules.common.functions import qs.modules.common.widgets ContentPage { @@ -90,6 +94,8 @@ ContentPage { } } + + ContentSection { icon: "keyboard" title: Translation.tr("Keybinds Cheatsheet") @@ -108,72 +114,58 @@ ContentPage { options: [ { displayName: "󰖳", - icon: "", value: 0 }, { displayName: "", - icon: "", value: 3 }, { displayName: "󰨡", - icon: "", value: 4 }, { displayName: "", - icon: "", value: 5 }, { displayName: "󰣇", - icon: "", value: 7 }, { displayName: "", - icon: "", value: 12 }, { displayName: "", - icon: "", value: 13 }, { displayName: "", - icon: "", value: 11 }, { displayName: "", - icon: "", value: 10 }, { displayName: "", - icon: "", value: 8 }, { displayName: "󱄛", - icon: "", value: 14 }, { - displayName: "", - icon: "", + displayName: "", value: 9 }, { displayName: "", - icon: "", value: 6 }, { displayName: "󰘳", - icon: "", value: 2 }, ] @@ -187,7 +179,11 @@ ContentPage { onCheckedChanged: { Config.options.appearance.keybinds.useMacSymbol = checked; } + StyledToolTip { + text: Translation.tr("macOS-style symbols, e.g. 󰘴 for Ctrl, 󰘵 for Alt, 󰘶 for Shift, etc") + } } + ConfigSwitch { buttonIcon: "󱊶" text: Translation.tr("Use symbols for function keys") @@ -195,6 +191,9 @@ ContentPage { onCheckedChanged: { Config.options.appearance.keybinds.useFnSymbol = checked; } + StyledToolTip { + text: Translation.tr("Show 󱊷 instead of Escape, 󱊫 for F1, etc to 󱊶 for F12") + } } ConfigSwitch { buttonIcon: "󰍽" @@ -203,6 +202,43 @@ ContentPage { onCheckedChanged: { Config.options.appearance.keybinds.useMouseSymbol = checked; } + StyledToolTip { + text: Translation.tr("Replace 󱕐 for \"Scroll ↓\", 󱕑 \"Scroll ↑\", L󰍽 \"LMB\", R󰍽 \"RMB\", 󱕒 \"Scroll ↑/↓\" and Page  for \"Page_↑/↓\"") + } + } + ConfigSwitch { + buttonIcon: "" + text: Translation.tr("Use macOS shortcut layout") + checked: Config.options.appearance.keybinds.useMacLikeShortcut + onCheckedChanged: { + Config.options.appearance.keybinds.useMacLikeShortcut = checked; + } + StyledToolTip { + text: Translation.tr("Show mods and key in the same keycap, look better with symbols") + } + + } + + ConfigSpinBox { + // text: Translation.tr("Keycap") + text: Translation.tr("Key font size") + value: Config.options.appearance.keybinds.pixelSize.key + from: Appearance.font.pixelSize.smallest + to: Appearance.font.pixelSize.large + stepSize: 1 + onValueChanged: { + Config.options.appearance.keybinds.pixelSize.key = value; + } + } + ConfigSpinBox { + text: Translation.tr("Comment font size") + value: Config.options.appearance.commentbinds.pixelSize.comment + from: Appearance.font.pixelSize.smallest + to: Appearance.font.pixelSize.large + stepSize: 1 + onValueChanged: { + Config.options.appearance.commentbinds.pixelSize.comment = value; + } } } } From 69fc9d9b3516ea44143ea7674c5235a68109dd04 Mon Sep 17 00:00:00 2001 From: Madjid Taha Date: Sat, 25 Oct 2025 17:00:01 +0200 Subject: [PATCH 05/44] fix comment pixelSize key --- .../.config/quickshell/ii/modules/settings/AdvancedConfig.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml b/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml index 103d5b8f2..912bb13f4 100644 --- a/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml +++ b/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml @@ -232,12 +232,12 @@ ContentPage { } ConfigSpinBox { text: Translation.tr("Comment font size") - value: Config.options.appearance.commentbinds.pixelSize.comment + value: Config.options.appearance.keybinds.pixelSize.comment from: Appearance.font.pixelSize.smallest to: Appearance.font.pixelSize.large stepSize: 1 onValueChanged: { - Config.options.appearance.commentbinds.pixelSize.comment = value; + Config.options.appearance.keybinds.pixelSize.comment = value; } } } From fc17f23533e952194b8a9d504f1ce4a07aa0a740 Mon Sep 17 00:00:00 2001 From: Madjid Taha Date: Sat, 25 Oct 2025 17:06:08 +0200 Subject: [PATCH 06/44] fix typo --- dots/.config/quickshell/ii/modules/common/Config.qml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/common/Config.qml b/dots/.config/quickshell/ii/modules/common/Config.qml index 11526c81b..38e47dd6b 100644 --- a/dots/.config/quickshell/ii/modules/common/Config.qml +++ b/dots/.config/quickshell/ii/modules/common/Config.qml @@ -135,8 +135,7 @@ Singleton { property bool useFnSymbol: false property JsonObject pixelSize: JsonObject { property int key: Appearance.font.pixelSize.smaller - property int comment: Appareance.font.pixelSize.smaller - } + property int comment: Appearance.font.pixelSize.smaller } } } From 90cc63e57aedafa7d9740afb35b072a9fd74830b Mon Sep 17 00:00:00 2001 From: Madjid Taha Date: Sun, 26 Oct 2025 14:58:28 +0100 Subject: [PATCH 07/44] checkbox on tooltip --- .../quickshell/ii/modules/settings/AdvancedConfig.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml b/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml index 912bb13f4..966e832aa 100644 --- a/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml +++ b/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml @@ -214,14 +214,14 @@ ContentPage { Config.options.appearance.keybinds.useMacLikeShortcut = checked; } StyledToolTip { - text: Translation.tr("Show mods and key in the same keycap, look better with symbols") + text: Translation.tr("Display modifiers and keys in a single keycap (e.g., \"Ctrl A\" instead of \"Ctrl + A\" or \"󰘴 A\" instead of \"󰘴 + A\")") } } ConfigSpinBox { // text: Translation.tr("Keycap") - text: Translation.tr("Key font size") + text: Translation.tr("Keybind font size") value: Config.options.appearance.keybinds.pixelSize.key from: Appearance.font.pixelSize.smallest to: Appearance.font.pixelSize.large @@ -231,7 +231,7 @@ ContentPage { } } ConfigSpinBox { - text: Translation.tr("Comment font size") + text: Translation.tr("Description font size") value: Config.options.appearance.keybinds.pixelSize.comment from: Appearance.font.pixelSize.smallest to: Appearance.font.pixelSize.large From c61da40f703304e934f65a608f70462d58b28c7e Mon Sep 17 00:00:00 2001 From: Madjid Taha Date: Tue, 28 Oct 2025 10:28:15 +0100 Subject: [PATCH 08/44] new symbol map --- .../modules/cheatsheet/CheatsheetKeybinds.qml | 84 +++++++++++-------- .../ii/modules/settings/AdvancedConfig.qml | 4 +- 2 files changed, 51 insertions(+), 37 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml index 64d695547..d7b7b056b 100644 --- a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml +++ b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml @@ -15,51 +15,65 @@ Item { implicitWidth: row.implicitWidth + padding * 2 implicitHeight: row.implicitHeight + padding * 2 property list superMap: [ - "󰖳", "󰌽", "󰘳", "", "󰨡", "", "", + "󰖳", "󰌽", "⌘", "", "󰨡", "", "", "󰣇", "", "", "", "", " ", "", "󱄛" ] + property var macSymbolMap: ({ + "Ctrl": "󰘴" , + "Alt": "󰘵" , + "Shift": "󰘶" , + "Space": "󱁐" , + "Tab": "↹" , + "Equal": "󰇼" , + "Minus": "" , + "Print": "" , + "BackSpace": "󰭜" , + "Delete": "⌦" , + "Return": "󰌑" , + "Period": "." , + "Escape": "⎋" + }) + property var functionSymbolMap: ({ + "F1": "󱊫", + "F2": "󱊬", + "F3": "󱊭", + "F4": "󱊮", + "F5": "󱊯", + "F6": "󱊰", + "F7": "󱊱", + "F8": "󱊲", + "F9": "󱊳", + "F10": "󱊴", + "F11": "󱊵", + "F12": "󱊶", + }) + + property var mouseSymbolMap: ({ + "mouse_up": "󱕐" , + "mouse_down": "󱕑", + "mouse:272": "L󰍽", + "mouse:273": "R󰍽", + "Scroll ↑/↓": "󱕒", + "Page_↑/↓": "⇞/⇟", + }) + property var keyBlacklist: ["Super_L"] property var keySubstitutions: ({ "Super": superMap[Config.options.appearance.keybinds.superKey], - "Ctrl": Config.options.appearance.keybinds.useMacSymbol ? "󰘴" : "Ctrl", - "Alt": Config.options.appearance.keybinds.useMacSymbol ? "󰘵" : "Alt", - "Shift": Config.options.appearance.keybinds.useMacSymbol ? "󰘶" : "Shift", - "Space": Config.options.appearance.keybinds.useMacSymbol ? "󱁐" : "Space", - "Tab": Config.options.appearance.keybinds.useMacSymbol ? "" : "Tab", - "Equal": Config.options.appearance.keybinds.useMacSymbol ? "󰇼" : "Equal", - "Minus": Config.options.appearance.keybinds.useMacSymbol ? "" : "Minus", - "Print": Config.options.appearance.keybinds.useMacSymbol ? "" : "Print", - "Delete": Config.options.appearance.keybinds.useMacSymbol ? "󰭜" : "Delete", - "Return": Config.options.appearance.keybinds.useMacSymbol ? "󰌑" : "Enter", - "Period": Config.options.appearance.keybinds.useMacSymbol ? "." : "Period", - - // Function keys - "Escape": Config.options.appearance.keybinds.useFnSymbol ? "󱊷" : "Escape", - "F1": Config.options.appearance.keybinds.useFnSymbol ? "󱊫" : "F1", - "F2": Config.options.appearance.keybinds.useFnSymbol ? "󱊬" : "F2", - "F3": Config.options.appearance.keybinds.useFnSymbol ? "󱊭" : "F3", - "F4": Config.options.appearance.keybinds.useFnSymbol ? "󱊮" : "F4", - "F5": Config.options.appearance.keybinds.useFnSymbol ? "󱊯" : "F5", - "F6": Config.options.appearance.keybinds.useFnSymbol ? "󱊰" : "F6", - "F7": Config.options.appearance.keybinds.useFnSymbol ? "󱊱" : "F7", - "F8": Config.options.appearance.keybinds.useFnSymbol ? "󱊲" : "F8", - "F9": Config.options.appearance.keybinds.useFnSymbol ? "󱊳" : "F9", - "F10": Config.options.appearance.keybinds.useFnSymbol ? "󱊴" : "F10", - "F11": Config.options.appearance.keybinds.useFnSymbol ? "󱊵" : "F11", - "F12": Config.options.appearance.keybinds.useFnSymbol ? "󱊶" : "F12", - // Mouse keys - "mouse_up": Config.options.appearance.keybinds.useMouseSymbol ? "󱕐" : "Scroll ↓", // ikr, weird - "mouse_down": Config.options.appearance.keybinds.useMouseSymbol ? "󱕑" : "Scroll ↑", // trust me bro - "mouse:272": Config.options.appearance.keybinds.useMouseSymbol ? "L󰍽" : "LMB", - "mouse:273": Config.options.appearance.keybinds.useMouseSymbol ? "R󰍽" : "RMB", - "Scroll ↑/↓": Config.options.appearance.keybinds.useMouseSymbol ? "󱕒" : "Scroll ↑/↓", - "Page_↑/↓": Config.options.appearance.keybinds.useMouseSymbol ? "Page " : "Page_↑/↓", + "mouse_up": "Scroll ↓", // ikr, weird + "mouse_down": "Scroll ↑", // trust me bro + "mouse:272": "LMB", + "mouse:273": "RMB", "mouse:275": "MouseBack", "Slash": "/", "Hash": "#", // "Shift": "", - }) + }, + Config.options.appearance.keybinds.useMacSymbol ? macSymbolMap : {}, + Config.options.appearance.keybinds.useFnSymbol ? functionSymbolMap : {}, + Config.options.appearance.keybinds.useMouseSymbol ? mouseSymbolMap : {}, + ) Row { // Keybind columns id: row diff --git a/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml b/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml index 966e832aa..bc05cf3fe 100644 --- a/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml +++ b/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml @@ -192,7 +192,7 @@ ContentPage { Config.options.appearance.keybinds.useFnSymbol = checked; } StyledToolTip { - text: Translation.tr("Show 󱊷 instead of Escape, 󱊫 for F1, etc to 󱊶 for F12") + text: Translation.tr("Show functions keys as symbols, e.g. 󱊫 for F1, 󱊶 for F12") } } ConfigSwitch { @@ -203,7 +203,7 @@ ContentPage { Config.options.appearance.keybinds.useMouseSymbol = checked; } StyledToolTip { - text: Translation.tr("Replace 󱕐 for \"Scroll ↓\", 󱕑 \"Scroll ↑\", L󰍽 \"LMB\", R󰍽 \"RMB\", 󱕒 \"Scroll ↑/↓\" and Page  for \"Page_↑/↓\"") + text: Translation.tr("Replace 󱕐 for \"Scroll ↓\", 󱕑 \"Scroll ↑\", L󰍽 \"LMB\", R󰍽 \"RMB\", 󱕒 \"Scroll ↑/↓\" and ⇞/⇟ for \"Page_↑/↓\"") } } ConfigSwitch { From 367b1b9499e2f5e6081cf52ff7e18882fd259fcd Mon Sep 17 00:00:00 2001 From: Madjid Taha Date: Tue, 28 Oct 2025 10:30:37 +0100 Subject: [PATCH 09/44] fix keySubstitutions --- .../quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml index d7b7b056b..9b7444156 100644 --- a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml +++ b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml @@ -58,7 +58,7 @@ Item { }) property var keyBlacklist: ["Super_L"] - property var keySubstitutions: ({ + property var keySubstitutions: Object.assign({ "Super": superMap[Config.options.appearance.keybinds.superKey], // Mouse keys "mouse_up": "Scroll ↓", // ikr, weird From 886e16a1cff624536442692500d55c9677ac4d93 Mon Sep 17 00:00:00 2001 From: Madjid Taha Date: Tue, 28 Oct 2025 10:37:32 +0100 Subject: [PATCH 10/44] add comment and bring back some value --- .../quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml index 9b7444156..d2eb9d922 100644 --- a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml +++ b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml @@ -14,6 +14,8 @@ Item { property real padding: 4 implicitWidth: row.implicitWidth + padding * 2 implicitHeight: row.implicitHeight + padding * 2 + // Excellent symbol explaination and source : + // http://xahlee.info/comp/unicode_computing_symbols.html property list superMap: [ "󰖳", "󰌽", "⌘", "", "󰨡", "", "", "󰣇", "", "", "", "", " ", "", "󱄛" @@ -68,6 +70,7 @@ Item { "mouse:275": "MouseBack", "Slash": "/", "Hash": "#", + "Return": "Enter", // "Shift": "", }, Config.options.appearance.keybinds.useMacSymbol ? macSymbolMap : {}, From fc479c358268864e55c9f80e424a85b75ec00049 Mon Sep 17 00:00:00 2001 From: Madjid Taha Date: Tue, 28 Oct 2025 10:41:43 +0100 Subject: [PATCH 11/44] clean some values --- .../quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml | 3 +-- .../quickshell/ii/modules/common/widgets/KeyboardKey.qml | 2 +- .../quickshell/ii/modules/settings/AdvancedConfig.qml | 5 ----- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml index d2eb9d922..8f26aa2c7 100644 --- a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml +++ b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml @@ -193,8 +193,7 @@ Item { StyledText { id: commentText anchors.centerIn: parent - // font.pixelSize: Appearance.font.pixelSize.smaller - font.pixelSize: Config.options.appearance.keybinds.pixelSize.comment + font.pixelSize: Config.options.appearance.keybinds.pixelSize.comment || Appearance.font.pixelSize.smaller text: modelData.comment } } diff --git a/dots/.config/quickshell/ii/modules/common/widgets/KeyboardKey.qml b/dots/.config/quickshell/ii/modules/common/widgets/KeyboardKey.qml index c769554ec..f620a3e3f 100644 --- a/dots/.config/quickshell/ii/modules/common/widgets/KeyboardKey.qml +++ b/dots/.config/quickshell/ii/modules/common/widgets/KeyboardKey.qml @@ -11,7 +11,7 @@ Rectangle { property real extraBottomBorderWidth: 2 property color borderColor: Appearance.colors.colOnLayer0 property real borderRadius: 5 - property int pixelSize: Appearance.font.pixelSize.smallie + property int pixelSize: Appearance.font.pixelSize.smaller property color keyColor: Appearance.m3colors.m3surfaceContainerLow implicitWidth: keyFace.implicitWidth + borderWidth * 2 implicitHeight: keyFace.implicitHeight + borderWidth * 2 + extraBottomBorderWidth diff --git a/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml b/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml index bc05cf3fe..e118358b9 100644 --- a/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml +++ b/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml @@ -1,10 +1,6 @@ import QtQuick -import Quickshell -import Quickshell.Io -import QtQuick.Layouts import qs.services import qs.modules.common -import qs.modules.common.functions import qs.modules.common.widgets ContentPage { @@ -220,7 +216,6 @@ ContentPage { } ConfigSpinBox { - // text: Translation.tr("Keycap") text: Translation.tr("Keybind font size") value: Config.options.appearance.keybinds.pixelSize.key from: Appearance.font.pixelSize.smallest From af64052e33b2e591434841d1e16f7e7853968cb8 Mon Sep 17 00:00:00 2001 From: Madjid Taha Date: Wed, 29 Oct 2025 10:29:34 +0100 Subject: [PATCH 12/44] remove super directly override --- .../quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml index 8f26aa2c7..127fbbbbc 100644 --- a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml +++ b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml @@ -61,8 +61,7 @@ Item { property var keyBlacklist: ["Super_L"] property var keySubstitutions: Object.assign({ - "Super": superMap[Config.options.appearance.keybinds.superKey], - // Mouse keys + "Super": "󰖳", "mouse_up": "Scroll ↓", // ikr, weird "mouse_down": "Scroll ↑", // trust me bro "mouse:272": "LMB", @@ -73,6 +72,9 @@ Item { "Return": "Enter", // "Shift": "", }, + Config.options.appearance.keybinds.superKey > 0 ? { + "Super": superMap[Config.options.appearance.keybinds.superKey], + }: {}, Config.options.appearance.keybinds.useMacSymbol ? macSymbolMap : {}, Config.options.appearance.keybinds.useFnSymbol ? functionSymbolMap : {}, Config.options.appearance.keybinds.useMouseSymbol ? mouseSymbolMap : {}, From 79df7bbeefa417829384d1b643c3d0f39e6c7031 Mon Sep 17 00:00:00 2001 From: Madjid Taha Date: Thu, 30 Oct 2025 17:00:31 +0100 Subject: [PATCH 13/44] add google (assistant, chrome, android) keys --- .../ii/modules/cheatsheet/CheatsheetKeybinds.qml | 3 ++- .../ii/modules/settings/AdvancedConfig.qml | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml index 127fbbbbc..4740b4975 100644 --- a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml +++ b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml @@ -18,7 +18,8 @@ Item { // http://xahlee.info/comp/unicode_computing_symbols.html property list superMap: [ "󰖳", "󰌽", "⌘", "", "󰨡", "", "", - "󰣇", "", "", "", "", " ", "", "󱄛" + "󰣇", "", "", "", "", " ", "", + "󱄛", "󰀲", "󰟍", "" ] property var macSymbolMap: ({ "Ctrl": "󰘴" , diff --git a/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml b/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml index e118358b9..4c9218edc 100644 --- a/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml +++ b/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml @@ -107,6 +107,7 @@ ContentPage { // 0: 󰖳 | 1: 󰌽 | 2: 󰘳 | 3:  | 4: 󰨡 // 5:  | 6:  | 7: 󰣇 | 8:  | 9:  // 10:  | 11:  | 12:  | 13:  | 14: 󱄛 + // 15: 󰀲 | 16: 󰟍 | 17:  | options: [ { displayName: "󰖳", @@ -164,6 +165,19 @@ ContentPage { displayName: "󰘳", value: 2 }, + { + displayName: "󰀲", + value: 15 + }, + { + displayName: "󰟍", + value: 16 + }, + { + displayName: "", + value: 17 + }, + ] } } From a0332cb0df936370d55b5f0c4f32845354b08c4b Mon Sep 17 00:00:00 2001 From: Madjid Taha Date: Thu, 30 Oct 2025 17:26:30 +0100 Subject: [PATCH 14/44] add reference to nerdfonts symbol cheat sheet --- .../quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml index 4740b4975..57a16ec0b 100644 --- a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml +++ b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml @@ -16,6 +16,7 @@ Item { implicitHeight: row.implicitHeight + padding * 2 // Excellent symbol explaination and source : // http://xahlee.info/comp/unicode_computing_symbols.html + // https://www.nerdfonts.com/cheat-sheet property list superMap: [ "󰖳", "󰌽", "⌘", "", "󰨡", "", "", "󰣇", "", "", "", "", " ", "", From aeb1955947dfe64a0731ff91d652435f3f479e2e Mon Sep 17 00:00:00 2001 From: Madjid Taha Date: Thu, 30 Oct 2025 22:12:25 +0100 Subject: [PATCH 15/44] end-4 feedback --- .../modules/cheatsheet/CheatsheetKeybinds.qml | 6 +- .../quickshell/ii/modules/common/Config.qml | 5 +- .../ii/modules/settings/AdvancedConfig.qml | 158 ----------------- .../ii/modules/settings/InterfaceConfig.qml | 159 ++++++++++++++++++ 4 files changed, 165 insertions(+), 163 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml index 57a16ec0b..80208df5e 100644 --- a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml +++ b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml @@ -169,7 +169,7 @@ Item { delegate: KeyboardKey { required property var modelData key: keySubstitutions[modelData] || modelData - pixelSize: Config.options.appearance.keybinds.pixelSize.key + pixelSize: Config.options.appearance.keybinds.fontSize.key } } StyledText { @@ -181,7 +181,7 @@ Item { id: keybindKey visible: !Config.options.appearance.keybinds.useMacLikeShortcut && !keyBlacklist.includes(modelData.key) key: keySubstitutions[modelData.key] || modelData.key - pixelSize: Config.options.appearance.keybinds.pixelSize.key + pixelSize: Config.options.appearance.keybinds.fontSize.key color: Appearance.colors.colOnLayer0 } } @@ -197,7 +197,7 @@ Item { StyledText { id: commentText anchors.centerIn: parent - font.pixelSize: Config.options.appearance.keybinds.pixelSize.comment || Appearance.font.pixelSize.smaller + font.pixelSize: Config.options.appearance.keybinds.fontSize.comment || Appearance.font.pixelSize.smaller text: modelData.comment } } diff --git a/dots/.config/quickshell/ii/modules/common/Config.qml b/dots/.config/quickshell/ii/modules/common/Config.qml index 38e47dd6b..6ae8d25f8 100644 --- a/dots/.config/quickshell/ii/modules/common/Config.qml +++ b/dots/.config/quickshell/ii/modules/common/Config.qml @@ -133,9 +133,10 @@ Singleton { property bool useMacLikeShortcut: false property bool useMouseSymbol: false property bool useFnSymbol: false - property JsonObject pixelSize: JsonObject { + property JsonObject fontSize: JsonObject { property int key: Appearance.font.pixelSize.smaller - property int comment: Appearance.font.pixelSize.smaller } + property int comment: Appearance.font.pixelSize.smaller + } } } diff --git a/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml b/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml index 4c9218edc..7d51dbe12 100644 --- a/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml +++ b/dots/.config/quickshell/ii/modules/settings/AdvancedConfig.qml @@ -92,162 +92,4 @@ ContentPage { - ContentSection { - icon: "keyboard" - title: Translation.tr("Keybinds Cheatsheet") - - ContentSubsection { - title: Translation.tr("Super Key Symbol") - ConfigSelectionArray { - currentValue: Config.options.appearance.keybinds.superKey - onSelected: newValue => { - Config.options.appearance.keybinds.superKey = newValue; - } - // Use a nerdfont to see the icons - // 0: 󰖳 | 1: 󰌽 | 2: 󰘳 | 3:  | 4: 󰨡 - // 5:  | 6:  | 7: 󰣇 | 8:  | 9:  - // 10:  | 11:  | 12:  | 13:  | 14: 󱄛 - // 15: 󰀲 | 16: 󰟍 | 17:  | - options: [ - { - displayName: "󰖳", - value: 0 - }, - { - displayName: "", - value: 3 - }, - { - displayName: "󰨡", - value: 4 - }, - { - displayName: "", - value: 5 - }, - { - displayName: "󰣇", - value: 7 - }, - { - displayName: "", - value: 12 - }, - { - displayName: "", - value: 13 - }, - { - displayName: "", - value: 11 - }, - { - displayName: "", - value: 10 - }, - { - displayName: "", - value: 8 - }, - { - displayName: "󱄛", - value: 14 - }, - { - displayName: "", - value: 9 - }, - { - displayName: "", - value: 6 - }, - { - displayName: "󰘳", - value: 2 - }, - { - displayName: "󰀲", - value: 15 - }, - { - displayName: "󰟍", - value: 16 - }, - { - displayName: "", - value: 17 - }, - - ] - } - } - - ConfigSwitch { - buttonIcon: "󰘵" - text: Translation.tr("Use macOS-like symbols for mods keys") - checked: Config.options.appearance.keybinds.useMacSymbol - onCheckedChanged: { - Config.options.appearance.keybinds.useMacSymbol = checked; - } - StyledToolTip { - text: Translation.tr("macOS-style symbols, e.g. 󰘴 for Ctrl, 󰘵 for Alt, 󰘶 for Shift, etc") - } - } - - ConfigSwitch { - buttonIcon: "󱊶" - text: Translation.tr("Use symbols for function keys") - checked: Config.options.appearance.keybinds.useFnSymbol - onCheckedChanged: { - Config.options.appearance.keybinds.useFnSymbol = checked; - } - StyledToolTip { - text: Translation.tr("Show functions keys as symbols, e.g. 󱊫 for F1, 󱊶 for F12") - } - } - ConfigSwitch { - buttonIcon: "󰍽" - text: Translation.tr("Use symbols for mouse") - checked: Config.options.appearance.keybinds.useMouseSymbol - onCheckedChanged: { - Config.options.appearance.keybinds.useMouseSymbol = checked; - } - StyledToolTip { - text: Translation.tr("Replace 󱕐 for \"Scroll ↓\", 󱕑 \"Scroll ↑\", L󰍽 \"LMB\", R󰍽 \"RMB\", 󱕒 \"Scroll ↑/↓\" and ⇞/⇟ for \"Page_↑/↓\"") - } - } - ConfigSwitch { - buttonIcon: "" - text: Translation.tr("Use macOS shortcut layout") - checked: Config.options.appearance.keybinds.useMacLikeShortcut - onCheckedChanged: { - Config.options.appearance.keybinds.useMacLikeShortcut = checked; - } - StyledToolTip { - text: Translation.tr("Display modifiers and keys in a single keycap (e.g., \"Ctrl A\" instead of \"Ctrl + A\" or \"󰘴 A\" instead of \"󰘴 + A\")") - } - - } - - ConfigSpinBox { - text: Translation.tr("Keybind font size") - value: Config.options.appearance.keybinds.pixelSize.key - from: Appearance.font.pixelSize.smallest - to: Appearance.font.pixelSize.large - stepSize: 1 - onValueChanged: { - Config.options.appearance.keybinds.pixelSize.key = value; - } - } - ConfigSpinBox { - text: Translation.tr("Description font size") - value: Config.options.appearance.keybinds.pixelSize.comment - from: Appearance.font.pixelSize.smallest - to: Appearance.font.pixelSize.large - stepSize: 1 - onValueChanged: { - Config.options.appearance.keybinds.pixelSize.comment = value; - } - } - } } diff --git a/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 13a909cbb..79b01bf95 100644 --- a/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -1012,4 +1012,163 @@ ContentPage { } } } + + ContentSection { + icon: "keyboard" + title: Translation.tr("Cheatsheet") + + ContentSubsection { + title: Translation.tr("Super Key Symbol") + ConfigSelectionArray { + currentValue: Config.options.appearance.keybinds.superKey + onSelected: newValue => { + Config.options.appearance.keybinds.superKey = newValue; + } + // Use a nerdfont to see the icons + // 0: 󰖳 | 1: 󰌽 | 2: 󰘳 | 3:  | 4: 󰨡 + // 5:  | 6:  | 7: 󰣇 | 8:  | 9:  + // 10:  | 11:  | 12:  | 13:  | 14: 󱄛 + // 15: 󰀲 | 16: 󰟍 | 17:  | + options: [ + { + displayName: "󰖳", + value: 0 + }, + { + displayName: "", + value: 3 + }, + { + displayName: "󰨡", + value: 4 + }, + { + displayName: "", + value: 5 + }, + { + displayName: "󰣇", + value: 7 + }, + { + displayName: "", + value: 12 + }, + { + displayName: "", + value: 13 + }, + { + displayName: "", + value: 11 + }, + { + displayName: "", + value: 10 + }, + { + displayName: "", + value: 8 + }, + { + displayName: "󱄛", + value: 14 + }, + { + displayName: "", + value: 9 + }, + { + displayName: "", + value: 6 + }, + { + displayName: "󰘳", + value: 2 + }, + { + displayName: "󰀲", + value: 15 + }, + { + displayName: "󰟍", + value: 16 + }, + { + displayName: "", + value: 17 + }, + + ] + } + } + + ConfigSwitch { + buttonIcon: "󰘵" + text: Translation.tr("Use macOS-like symbols for mods keys") + checked: Config.options.appearance.keybinds.useMacSymbol + onCheckedChanged: { + Config.options.appearance.keybinds.useMacSymbol = checked; + } + StyledToolTip { + text: Translation.tr("macOS-style symbols, e.g. 󰘴 for Ctrl, 󰘵 for Alt, 󰘶 for Shift, etc") + } + } + + ConfigSwitch { + buttonIcon: "󱊶" + text: Translation.tr("Use symbols for function keys") + checked: Config.options.appearance.keybinds.useFnSymbol + onCheckedChanged: { + Config.options.appearance.keybinds.useFnSymbol = checked; + } + StyledToolTip { + text: Translation.tr("Show functions keys as symbols, e.g. 󱊫 for F1, 󱊶 for F12") + } + } + ConfigSwitch { + buttonIcon: "󰍽" + text: Translation.tr("Use symbols for mouse") + checked: Config.options.appearance.keybinds.useMouseSymbol + onCheckedChanged: { + Config.options.appearance.keybinds.useMouseSymbol = checked; + } + StyledToolTip { + text: Translation.tr("Replace 󱕐 for \"Scroll ↓\", 󱕑 \"Scroll ↑\", L󰍽 \"LMB\", R󰍽 \"RMB\", 󱕒 \"Scroll ↑/↓\" and ⇞/⇟ for \"Page_↑/↓\"") + } + } + ConfigSwitch { + buttonIcon: "" + text: Translation.tr("Use macOS shortcut layout") + checked: Config.options.appearance.keybinds.useMacLikeShortcut + onCheckedChanged: { + Config.options.appearance.keybinds.useMacLikeShortcut = checked; + } + StyledToolTip { + text: Translation.tr("Display modifiers and keys in a single keycap (e.g., \"Ctrl A\" instead of \"Ctrl + A\" or \"󰘴 A\" instead of \"󰘴 + A\")") + } + + } + + ConfigSpinBox { + text: Translation.tr("Keybind font size") + value: Config.options.appearance.keybinds.fontSize.key + from: Appearance.font.pixelSize.smallest + to: Appearance.font.pixelSize.large + stepSize: 1 + onValueChanged: { + Config.options.appearance.keybinds.fontSize.key = value; + } + } + ConfigSpinBox { + text: Translation.tr("Description font size") + value: Config.options.appearance.keybinds.fontSize.comment + from: Appearance.font.pixelSize.smallest + to: Appearance.font.pixelSize.large + stepSize: 1 + onValueChanged: { + Config.options.appearance.keybinds.fontSize.comment = value; + } + } + } } From 0c2916705753605d2b935832b0fcad49afe93dd5 Mon Sep 17 00:00:00 2001 From: Madjid Taha Date: Sun, 2 Nov 2025 17:23:31 +0100 Subject: [PATCH 16/44] try something for the nyx-4 feedback --- .../modules/cheatsheet/CheatsheetKeybinds.qml | 37 ++++---- .../quickshell/ii/modules/common/Config.qml | 2 +- .../ii/modules/settings/InterfaceConfig.qml | 84 ++----------------- 3 files changed, 26 insertions(+), 97 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml index 80208df5e..d47acc9a0 100644 --- a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml +++ b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml @@ -17,25 +17,20 @@ Item { // Excellent symbol explaination and source : // http://xahlee.info/comp/unicode_computing_symbols.html // https://www.nerdfonts.com/cheat-sheet - property list superMap: [ - "󰖳", "󰌽", "⌘", "", "󰨡", "", "", - "󰣇", "", "", "", "", " ", "", - "󱄛", "󰀲", "󰟍", "" - ] property var macSymbolMap: ({ - "Ctrl": "󰘴" , - "Alt": "󰘵" , - "Shift": "󰘶" , - "Space": "󱁐" , - "Tab": "↹" , - "Equal": "󰇼" , - "Minus": "" , - "Print": "" , - "BackSpace": "󰭜" , - "Delete": "⌦" , - "Return": "󰌑" , - "Period": "." , - "Escape": "⎋" + "Ctrl": "󰘴", + "Alt": "󰘵", + "Shift": "󰘶", + "Space": "󱁐", + "Tab": "↹", + "Equal": "󰇼", + "Minus": "", + "Print": "", + "BackSpace": "󰭜", + "Delete": "⌦", + "Return": "󰌑", + "Period": ".", + "Escape": "⎋" }) property var functionSymbolMap: ({ "F1": "󱊫", @@ -53,7 +48,7 @@ Item { }) property var mouseSymbolMap: ({ - "mouse_up": "󱕐" , + "mouse_up": "󱕐", "mouse_down": "󱕑", "mouse:272": "L󰍽", "mouse:273": "R󰍽", @@ -74,8 +69,8 @@ Item { "Return": "Enter", // "Shift": "", }, - Config.options.appearance.keybinds.superKey > 0 ? { - "Super": superMap[Config.options.appearance.keybinds.superKey], + !!Config.options.appearance.keybinds.superKey ? { + "Super": Config.options.appearance.keybinds.superKey, }: {}, Config.options.appearance.keybinds.useMacSymbol ? macSymbolMap : {}, Config.options.appearance.keybinds.useFnSymbol ? functionSymbolMap : {}, diff --git a/dots/.config/quickshell/ii/modules/common/Config.qml b/dots/.config/quickshell/ii/modules/common/Config.qml index 6ae8d25f8..c4af0a850 100644 --- a/dots/.config/quickshell/ii/modules/common/Config.qml +++ b/dots/.config/quickshell/ii/modules/common/Config.qml @@ -128,7 +128,7 @@ Singleton { // 0: 󰖳 | 1: 󰌽 | 2: 󰘳 | 3:  | 4: 󰨡 // 5:  | 6:  | 7: 󰣇 | 8:  | 9:  // 10:  | 11:  | 12:  | 13:  | 14: 󱄛 - property int superKey: 0 + property string superKey: "󰖳" property bool useMacSymbol: false property bool useMacLikeShortcut: false property bool useMouseSymbol: false diff --git a/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 79b01bf95..b1d51063b 100644 --- a/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -1019,87 +1019,21 @@ ContentPage { ContentSubsection { title: Translation.tr("Super Key Symbol") + tooltip: Translation.tr("Choose a symbol from this list or edit config.json and add your own nerd symbol in appearance.keybinds.superKey.") ConfigSelectionArray { currentValue: Config.options.appearance.keybinds.superKey onSelected: newValue => { Config.options.appearance.keybinds.superKey = newValue; } // Use a nerdfont to see the icons - // 0: 󰖳 | 1: 󰌽 | 2: 󰘳 | 3:  | 4: 󰨡 - // 5:  | 6:  | 7: 󰣇 | 8:  | 9:  - // 10:  | 11:  | 12:  | 13:  | 14: 󱄛 - // 15: 󰀲 | 16: 󰟍 | 17:  | - options: [ - { - displayName: "󰖳", - value: 0 - }, - { - displayName: "", - value: 3 - }, - { - displayName: "󰨡", - value: 4 - }, - { - displayName: "", - value: 5 - }, - { - displayName: "󰣇", - value: 7 - }, - { - displayName: "", - value: 12 - }, - { - displayName: "", - value: 13 - }, - { - displayName: "", - value: 11 - }, - { - displayName: "", - value: 10 - }, - { - displayName: "", - value: 8 - }, - { - displayName: "󱄛", - value: 14 - }, - { - displayName: "", - value: 9 - }, - { - displayName: "", - value: 6 - }, - { - displayName: "󰘳", - value: 2 - }, - { - displayName: "󰀲", - value: 15 - }, - { - displayName: "󰟍", - value: 16 - }, - { - displayName: "", - value: 17 - }, - - ] + options: ([ + "󰖳", "", "󰨡", "", "󰌽", "󰣇", "", "", "", + "", "", "󱄛", "", "", "⌘", "󰀲", "󰟍", "" + ]).map(icon => { return { + displayName: icon, + value: icon + } + }) } } From a28945f3eceff58a7eca4b3d298561789fc13540 Mon Sep 17 00:00:00 2001 From: Madjid Taha Date: Tue, 4 Nov 2025 17:51:16 +0100 Subject: [PATCH 17/44] fix: remove warning unqualified access --- .../quickshell/ii/modules/common/widgets/KeyboardKey.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/common/widgets/KeyboardKey.qml b/dots/.config/quickshell/ii/modules/common/widgets/KeyboardKey.qml index f620a3e3f..cdb287aca 100644 --- a/dots/.config/quickshell/ii/modules/common/widgets/KeyboardKey.qml +++ b/dots/.config/quickshell/ii/modules/common/widgets/KeyboardKey.qml @@ -11,7 +11,7 @@ Rectangle { property real extraBottomBorderWidth: 2 property color borderColor: Appearance.colors.colOnLayer0 property real borderRadius: 5 - property int pixelSize: Appearance.font.pixelSize.smaller + property real pixelSize: Appearance.font.pixelSize.smaller property color keyColor: Appearance.m3colors.m3surfaceContainerLow implicitWidth: keyFace.implicitWidth + borderWidth * 2 implicitHeight: keyFace.implicitHeight + borderWidth * 2 + extraBottomBorderWidth @@ -36,7 +36,7 @@ Rectangle { id: keyText anchors.centerIn: parent font.family: Appearance.font.family.monospace - font.pixelSize: pixelSize + font.pixelSize: root.pixelSize text: key } } From ede86dc7a73a1fc91c8487aff4f18eaca99b7cdf Mon Sep 17 00:00:00 2001 From: Madjid Taha Date: Tue, 4 Nov 2025 20:55:34 +0100 Subject: [PATCH 18/44] fix(cheatsheet): change config keys --- .../modules/cheatsheet/CheatsheetKeybinds.qml | 22 +-- .../quickshell/ii/modules/common/Config.qml | 31 +-- .../ii/modules/settings/InterfaceConfig.qml | 184 +++++++++--------- 3 files changed, 119 insertions(+), 118 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml index a7c32fa13..3a78e86ce 100644 --- a/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml +++ b/dots/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml @@ -69,12 +69,12 @@ Item { "Return": "Enter", // "Shift": "", }, - !!Config.options.appearance.keybinds.superKey ? { - "Super": Config.options.appearance.keybinds.superKey, + !!Config.options.cheatsheet.superKey ? { + "Super": Config.options.cheatsheet.superKey, }: {}, - Config.options.appearance.keybinds.useMacSymbol ? macSymbolMap : {}, - Config.options.appearance.keybinds.useFnSymbol ? functionSymbolMap : {}, - Config.options.appearance.keybinds.useMouseSymbol ? mouseSymbolMap : {}, + Config.options.cheatsheet.useMacSymbol ? macSymbolMap : {}, + Config.options.cheatsheet.useFnSymbol ? functionSymbolMap : {}, + Config.options.cheatsheet.useMouseSymbol ? mouseSymbolMap : {}, ) Row { // Keybind columns @@ -126,7 +126,7 @@ Item { for (var i = 0; i < keybindSection.modelData.keybinds.length; i++) { const keybind = keybindSection.modelData.keybinds[i]; - if (Config.options.appearance.keybinds.useMacLikeShortcut) { + if (!Config.options.cheatsheet.splitButtons) { for (var j = 0; j < keybind.mods.length; j++) { keybind.mods[j] = keySubstitutions[keybind.mods[j]] || keybind.mods[j]; @@ -167,19 +167,19 @@ Item { delegate: KeyboardKey { required property var modelData key: keySubstitutions[modelData] || modelData - pixelSize: Config.options.appearance.keybinds.fontSize.key + pixelSize: Config.options.cheatsheet.fontSize.key } } StyledText { id: keybindPlus - visible: !Config.options.appearance.keybinds.useMacLikeShortcut && !keyBlacklist.includes(modelData.key) && modelData.mods.length > 0 + visible: Config.options.cheatsheet.splitButtons && !keyBlacklist.includes(modelData.key) && modelData.mods.length > 0 text: "+" } KeyboardKey { id: keybindKey - visible: !Config.options.appearance.keybinds.useMacLikeShortcut && !keyBlacklist.includes(modelData.key) + visible: Config.options.cheatsheet.splitButtons && !keyBlacklist.includes(modelData.key) key: keySubstitutions[modelData.key] || modelData.key - pixelSize: Config.options.appearance.keybinds.fontSize.key + pixelSize: Config.options.cheatsheet.fontSize.key color: Appearance.colors.colOnLayer0 } } @@ -195,7 +195,7 @@ Item { StyledText { id: commentText anchors.centerIn: parent - font.pixelSize: Config.options.appearance.keybinds.fontSize.comment || Appearance.font.pixelSize.smaller + font.pixelSize: Config.options.cheatsheet.fontSize.comment || Appearance.font.pixelSize.smaller text: modelData.comment } } diff --git a/dots/.config/quickshell/ii/modules/common/Config.qml b/dots/.config/quickshell/ii/modules/common/Config.qml index 766033e47..15b143c8c 100644 --- a/dots/.config/quickshell/ii/modules/common/Config.qml +++ b/dots/.config/quickshell/ii/modules/common/Config.qml @@ -123,21 +123,6 @@ Singleton { property JsonObject palette: JsonObject { property string type: "auto" // Allowed: auto, scheme-content, scheme-expressive, scheme-fidelity, scheme-fruit-salad, scheme-monochrome, scheme-neutral, scheme-rainbow, scheme-tonal-spot } - property JsonObject keybinds: JsonObject { - // Use a nerdfont to see the icons - // 0: 󰖳 | 1: 󰌽 | 2: 󰘳 | 3:  | 4: 󰨡 - // 5:  | 6:  | 7: 󰣇 | 8:  | 9:  - // 10:  | 11:  | 12:  | 13:  | 14: 󱄛 - property string superKey: "󰖳" - property bool useMacSymbol: false - property bool useMacLikeShortcut: false - property bool useMouseSymbol: false - property bool useFnSymbol: false - property JsonObject fontSize: JsonObject { - property int key: Appearance.font.pixelSize.smaller - property int comment: Appearance.font.pixelSize.smaller - } - } } property JsonObject audio: JsonObject { @@ -274,6 +259,22 @@ Singleton { property int suspend: 3 } + property JsonObject cheatsheet: JsonObject { + // Use a nerdfont to see the icons + // 0: 󰖳 | 1: 󰌽 | 2: 󰘳 | 3:  | 4: 󰨡 + // 5:  | 6:  | 7: 󰣇 | 8:  | 9:  + // 10:  | 11:  | 12:  | 13:  | 14: 󱄛 + property string superKey: "󰖳" + property bool useMacSymbol: false + property bool splitButtons: true + property bool useMouseSymbol: false + property bool useFnSymbol: false + property JsonObject fontSize: JsonObject { + property int key: Appearance.font.pixelSize.smaller + property int comment: Appearance.font.pixelSize.smaller + } + } + property JsonObject conflictKiller: JsonObject { property bool autoKillNotificationDaemons: false property bool autoKillTrays: false diff --git a/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 90aa11030..431b8f2ea 100644 --- a/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -402,6 +402,98 @@ ContentPage { } } + ContentSection { + icon: "keyboard" + title: Translation.tr("Cheat sheet") + + ContentSubsection { + title: Translation.tr("Super key symbol") + tooltip: Translation.tr("Choose a symbol from this list or edit config.json and add your own nerd symbol in cheatsheet.superKey.") + ConfigSelectionArray { + currentValue: Config.options.cheatsheet.superKey + onSelected: newValue => { + Config.options.cheatsheet.superKey = newValue; + } + // Use a nerdfont to see the icons + options: ([ + "󰖳", "", "󰨡", "", "󰌽", "󰣇", "", "", "", + "", "", "󱄛", "", "", "⌘", "󰀲", "󰟍", "" + ]).map(icon => { return { + displayName: icon, + value: icon + } + }) + } + } + + ConfigSwitch { + buttonIcon: "󰘵" + text: Translation.tr("Use macOS-like symbols for mods keys") + checked: Config.options.cheatsheet.useMacSymbol + onCheckedChanged: { + Config.options.cheatsheet.useMacSymbol = checked; + } + StyledToolTip { + text: Translation.tr("e.g. 󰘴 for Ctrl, 󰘵 for Alt, 󰘶 for Shift, etc") + } + } + + ConfigSwitch { + buttonIcon: "󱊶" + text: Translation.tr("Use symbols for function keys") + checked: Config.options.cheatsheet.useFnSymbol + onCheckedChanged: { + Config.options.cheatsheet.useFnSymbol = checked; + } + StyledToolTip { + text: Translation.tr("e.g. 󱊫 for F1, 󱊶 for F12") + } + } + ConfigSwitch { + buttonIcon: "󰍽" + text: Translation.tr("Use symbols for mouse") + checked: Config.options.cheatsheet.useMouseSymbol + onCheckedChanged: { + Config.options.cheatsheet.useMouseSymbol = checked; + } + StyledToolTip { + text: Translation.tr("Replace 󱕐 for \"Scroll ↓\", 󱕑 \"Scroll ↑\", L󰍽 \"LMB\", R󰍽 \"RMB\", 󱕒 \"Scroll ↑/↓\" and ⇞/⇟ for \"Page_↑/↓\"") + } + } + ConfigSwitch { + buttonIcon: "highlight_keyboard_focus" + text: Translation.tr("Split Buttons") + checked: Config.options.cheatsheet.splitButtons + onCheckedChanged: { + Config.options.cheatsheet.splitButtons = checked; + } + StyledToolTip { + text: Translation.tr("Display modifiers and keys in multiple keycap (e.g., \"Ctrl + A\" instead of \"Ctrl A\" or \"󰘴 + A\" instead of \"󰘴 A\")") + } + + } + + ConfigSpinBox { + text: Translation.tr("Keybind font size") + value: Config.options.cheatsheet.fontSize.key + from: 8 + to: 30 + stepSize: 1 + onValueChanged: { + Config.options.cheatsheet.fontSize.key = value; + } + } + ConfigSpinBox { + text: Translation.tr("Description font size") + value: Config.options.cheatsheet.fontSize.comment + from: 8 + to: 30 + stepSize: 1 + onValueChanged: { + Config.options.cheatsheet.fontSize.comment = value; + } + } + } ContentSection { icon: "point_scan" title: Translation.tr("Crosshair overlay") @@ -1021,96 +1113,4 @@ ContentPage { } } - ContentSection { - icon: "keyboard" - title: Translation.tr("Cheatsheet") - - ContentSubsection { - title: Translation.tr("Super Key Symbol") - tooltip: Translation.tr("Choose a symbol from this list or edit config.json and add your own nerd symbol in appearance.keybinds.superKey.") - ConfigSelectionArray { - currentValue: Config.options.appearance.keybinds.superKey - onSelected: newValue => { - Config.options.appearance.keybinds.superKey = newValue; - } - // Use a nerdfont to see the icons - options: ([ - "󰖳", "", "󰨡", "", "󰌽", "󰣇", "", "", "", - "", "", "󱄛", "", "", "⌘", "󰀲", "󰟍", "" - ]).map(icon => { return { - displayName: icon, - value: icon - } - }) - } - } - - ConfigSwitch { - buttonIcon: "󰘵" - text: Translation.tr("Use macOS-like symbols for mods keys") - checked: Config.options.appearance.keybinds.useMacSymbol - onCheckedChanged: { - Config.options.appearance.keybinds.useMacSymbol = checked; - } - StyledToolTip { - text: Translation.tr("macOS-style symbols, e.g. 󰘴 for Ctrl, 󰘵 for Alt, 󰘶 for Shift, etc") - } - } - - ConfigSwitch { - buttonIcon: "󱊶" - text: Translation.tr("Use symbols for function keys") - checked: Config.options.appearance.keybinds.useFnSymbol - onCheckedChanged: { - Config.options.appearance.keybinds.useFnSymbol = checked; - } - StyledToolTip { - text: Translation.tr("Show functions keys as symbols, e.g. 󱊫 for F1, 󱊶 for F12") - } - } - ConfigSwitch { - buttonIcon: "󰍽" - text: Translation.tr("Use symbols for mouse") - checked: Config.options.appearance.keybinds.useMouseSymbol - onCheckedChanged: { - Config.options.appearance.keybinds.useMouseSymbol = checked; - } - StyledToolTip { - text: Translation.tr("Replace 󱕐 for \"Scroll ↓\", 󱕑 \"Scroll ↑\", L󰍽 \"LMB\", R󰍽 \"RMB\", 󱕒 \"Scroll ↑/↓\" and ⇞/⇟ for \"Page_↑/↓\"") - } - } - ConfigSwitch { - buttonIcon: "" - text: Translation.tr("Use macOS shortcut layout") - checked: Config.options.appearance.keybinds.useMacLikeShortcut - onCheckedChanged: { - Config.options.appearance.keybinds.useMacLikeShortcut = checked; - } - StyledToolTip { - text: Translation.tr("Display modifiers and keys in a single keycap (e.g., \"Ctrl A\" instead of \"Ctrl + A\" or \"󰘴 A\" instead of \"󰘴 + A\")") - } - - } - - ConfigSpinBox { - text: Translation.tr("Keybind font size") - value: Config.options.appearance.keybinds.fontSize.key - from: Appearance.font.pixelSize.smallest - to: Appearance.font.pixelSize.large - stepSize: 1 - onValueChanged: { - Config.options.appearance.keybinds.fontSize.key = value; - } - } - ConfigSpinBox { - text: Translation.tr("Description font size") - value: Config.options.appearance.keybinds.fontSize.comment - from: Appearance.font.pixelSize.smallest - to: Appearance.font.pixelSize.large - stepSize: 1 - onValueChanged: { - Config.options.appearance.keybinds.fontSize.comment = value; - } - } - } } From a0131e5bf83cc4533f54afcde62f81800ba2e3bf Mon Sep 17 00:00:00 2001 From: Madjid Taha Date: Thu, 6 Nov 2025 12:33:29 +0100 Subject: [PATCH 19/44] fix: use end-4 copy in InterfaceConfig --- .../quickshell/ii/modules/settings/InterfaceConfig.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 22a67f6fd..8e4aab5ab 100644 --- a/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -408,7 +408,7 @@ ContentPage { ContentSubsection { title: Translation.tr("Super key symbol") - tooltip: Translation.tr("Choose a symbol from this list or edit config.json and add your own nerd symbol in cheatsheet.superKey.") + tooltip: Translation.tr("You can also manually edit cheatsheet.superKey") ConfigSelectionArray { currentValue: Config.options.cheatsheet.superKey onSelected: newValue => { @@ -462,7 +462,7 @@ ContentPage { } ConfigSwitch { buttonIcon: "highlight_keyboard_focus" - text: Translation.tr("Split Buttons") + text: Translation.tr("Split buttons") checked: Config.options.cheatsheet.splitButtons onCheckedChanged: { Config.options.cheatsheet.splitButtons = checked; From 60144ca3debb8a2ad979ccd384b4fe1867a5e42b Mon Sep 17 00:00:00 2001 From: reakjra Date: Thu, 6 Nov 2025 14:23:13 +0100 Subject: [PATCH 20/44] Feature (Overlay): MangoHud Fps Limiter widget --- .../ii/modules/common/Persistent.qml | 6 ++ .../quickshell/ii/modules/overlay/Overlay.qml | 12 ++- .../ii/modules/overlay/OverlayContent.qml | 1 + .../ii/modules/overlay/OverlayContext.qml | 1 + .../overlay/OverlayWidgetDelegateChooser.qml | 2 + .../modules/overlay/fpsLimiter/FpsLimiter.qml | 10 ++ .../overlay/fpsLimiter/FpsLimiterContent.qml | 92 +++++++++++++++++++ 7 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiter.qml create mode 100644 dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml diff --git a/dots/.config/quickshell/ii/modules/common/Persistent.qml b/dots/.config/quickshell/ii/modules/common/Persistent.qml index 814938452..7e077b2c3 100644 --- a/dots/.config/quickshell/ii/modules/common/Persistent.qml +++ b/dots/.config/quickshell/ii/modules/common/Persistent.qml @@ -93,6 +93,12 @@ Singleton { property real x: 55 property real y: 188 } + property JsonObject fpsLimiter: JsonObject { + property bool pinned: false + property bool clickthrough: false + property real x: 100 + property real y: 100 + } } property JsonObject timer: JsonObject { diff --git a/dots/.config/quickshell/ii/modules/overlay/Overlay.qml b/dots/.config/quickshell/ii/modules/overlay/Overlay.qml index 5054b9d1c..2fd33fcd7 100644 --- a/dots/.config/quickshell/ii/modules/overlay/Overlay.qml +++ b/dots/.config/quickshell/ii/modules/overlay/Overlay.qml @@ -25,7 +25,7 @@ Scope { exclusionMode: ExclusionMode.Ignore WlrLayershell.namespace: "quickshell:overlay" WlrLayershell.layer: WlrLayer.Overlay - WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand + WlrLayershell.keyboardFocus: GlobalStates.overlayOpen ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None visible: true color: "transparent" @@ -43,6 +43,16 @@ Scope { right: true } + HyprlandFocusGrab { + id: grab + windows: [overlayWindow] + active: GlobalStates.overlayOpen + onCleared: () => { + if (!active) + GlobalStates.overlayOpen = false; + } + } + OverlayContent { id: overlayContent anchors.fill: parent diff --git a/dots/.config/quickshell/ii/modules/overlay/OverlayContent.qml b/dots/.config/quickshell/ii/modules/overlay/OverlayContent.qml index 838267b80..546962185 100644 --- a/dots/.config/quickshell/ii/modules/overlay/OverlayContent.qml +++ b/dots/.config/quickshell/ii/modules/overlay/OverlayContent.qml @@ -12,6 +12,7 @@ import qs.modules.overlay.crosshair Item { id: root + focus: true readonly property bool usePasswordChars: !PolkitService.flow?.responseVisible ?? true Keys.onPressed: (event) => { // Esc to close diff --git a/dots/.config/quickshell/ii/modules/overlay/OverlayContext.qml b/dots/.config/quickshell/ii/modules/overlay/OverlayContext.qml index 1417c8467..cc54d379f 100644 --- a/dots/.config/quickshell/ii/modules/overlay/OverlayContext.qml +++ b/dots/.config/quickshell/ii/modules/overlay/OverlayContext.qml @@ -7,6 +7,7 @@ Singleton { readonly property list availableWidgets: [ { identifier: "crosshair", materialSymbol: "point_scan" }, + { identifier: "fpsLimiter", materialSymbol: "speed" }, { identifier: "volumeMixer", materialSymbol: "volume_up" } ] diff --git a/dots/.config/quickshell/ii/modules/overlay/OverlayWidgetDelegateChooser.qml b/dots/.config/quickshell/ii/modules/overlay/OverlayWidgetDelegateChooser.qml index e7420f625..dffdfaaee 100644 --- a/dots/.config/quickshell/ii/modules/overlay/OverlayWidgetDelegateChooser.qml +++ b/dots/.config/quickshell/ii/modules/overlay/OverlayWidgetDelegateChooser.qml @@ -8,6 +8,7 @@ import Quickshell import Quickshell.Bluetooth import qs.modules.overlay.crosshair import qs.modules.overlay.volumeMixer +import qs.modules.overlay.fpsLimiter DelegateChooser { id: root @@ -15,4 +16,5 @@ DelegateChooser { DelegateChoice { roleValue: "crosshair"; Crosshair {} } DelegateChoice { roleValue: "volumeMixer"; VolumeMixer {} } + DelegateChoice { roleValue: "fpsLimiter"; FpsLimiter {} } } diff --git a/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiter.qml b/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiter.qml new file mode 100644 index 000000000..fe3ab9df4 --- /dev/null +++ b/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiter.qml @@ -0,0 +1,10 @@ +import QtQuick +import Quickshell +import qs.modules.common +import qs.modules.overlay + +StyledOverlayWidget { + id: root + title: "FPS Limiter" + contentItem: FpsLimiterContent {} +} diff --git a/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml b/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml new file mode 100644 index 000000000..fae1aca78 --- /dev/null +++ b/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml @@ -0,0 +1,92 @@ +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls +import Quickshell +import Quickshell.Io +import qs.modules.common +import qs.modules.common.widgets + +Rectangle { + id: root + color: Appearance.m3colors.m3surfaceContainer + property real padding: 20 + implicitWidth: contentColumn.implicitWidth + padding * 2 + implicitHeight: contentColumn.implicitHeight + padding * 2 + + function applyLimit() { + var fpsValue = parseInt(fpsField.text); + if (isNaN(fpsValue) || fpsValue < 0) { + return; + } + + var cfgPaths = [ + "~/.config/MangoHud/MangoHud.conf", + ]; // MangoHud config files + + var updateCommands = cfgPaths.map(path => { + return "if grep -q '^fps_limit=' " + path + "; " + + "then sed -i 's/^fps_limit=.*/fps_limit=" + fpsValue + "/' " + path + "; " + + "else echo 'fps_limit=" + fpsValue + "' >> " + path + "; fi"; + }).join("; "); + + var cmd = updateCommands + "; pkill -SIGUSR2 mangohud"; + + fpsSetter.command = ["bash", "-c", cmd]; + fpsSetter.startDetached(); + + // Clear the field after applying + fpsField.text = ""; + } + + Keys.onPressed: event => { + if (event.key === Qt.Key_Escape) { + fpsField.text = ""; + event.accepted = true; + } + } + + ColumnLayout { + id: contentColumn + anchors.centerIn: parent + spacing: 15 + + RowLayout { + Layout.fillWidth: true + spacing: 10 + + ToolbarTextField { + id: fpsField + Layout.fillWidth: true + Layout.preferredWidth: 200 + placeholderText: qsTr("Set FPS limit (e.g. 80)") + inputMethodHints: Qt.ImhDigitsOnly + focus: true + + Keys.onReturnPressed: { + root.applyLimit(); + event.accepted = true; + } + } + + RippleButton { + id: applyButton + implicitWidth: 36 + implicitHeight: 36 + buttonRadius: Appearance.rounding.full + onClicked: { + root.applyLimit(); + } + contentItem: MaterialSymbol { + anchors.centerIn: parent + horizontalAlignment: Text.AlignHCenter + font.pixelSize: Appearance.font.pixelSize.title + text: "keyboard_return" + } + } + } + + Process { + id: fpsSetter + } + } +} From f4c32f89f2df6337ed71e14b4703f837e030821b Mon Sep 17 00:00:00 2001 From: reakjra Date: Thu, 6 Nov 2025 22:41:14 +0100 Subject: [PATCH 21/44] Added proposed fixes and implemented some animations+error text --- .../quickshell/ii/modules/overlay/Overlay.qml | 11 +++++ .../ii/modules/overlay/OverlayContext.qml | 2 +- .../modules/overlay/fpsLimiter/FpsLimiter.qml | 2 +- .../overlay/fpsLimiter/FpsLimiterContent.qml | 48 +++++++++++++++++-- 4 files changed, 57 insertions(+), 6 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/overlay/Overlay.qml b/dots/.config/quickshell/ii/modules/overlay/Overlay.qml index 2fd33fcd7..efb37cd89 100644 --- a/dots/.config/quickshell/ii/modules/overlay/Overlay.qml +++ b/dots/.config/quickshell/ii/modules/overlay/Overlay.qml @@ -47,12 +47,23 @@ Scope { id: grab windows: [overlayWindow] active: GlobalStates.overlayOpen + onActiveChanged: { + if (active) { + // Quick workspace flick to unlock cursor from game's relative mode + cursorUnlockProcess.running = true; + } + } onCleared: () => { if (!active) GlobalStates.overlayOpen = false; } } + Process { + id: cursorUnlockProcess + command: ["bash", "-c", "ws=$(hyprctl activeworkspace -j | jq -r '.id'); hyprctl --batch \"keyword animations:enabled 0 ; dispatch workspace empty ; dispatch workspace $ws ; keyword animations:enabled 1\""] + } + OverlayContent { id: overlayContent anchors.fill: parent diff --git a/dots/.config/quickshell/ii/modules/overlay/OverlayContext.qml b/dots/.config/quickshell/ii/modules/overlay/OverlayContext.qml index cc54d379f..dcfeae099 100644 --- a/dots/.config/quickshell/ii/modules/overlay/OverlayContext.qml +++ b/dots/.config/quickshell/ii/modules/overlay/OverlayContext.qml @@ -7,7 +7,7 @@ Singleton { readonly property list availableWidgets: [ { identifier: "crosshair", materialSymbol: "point_scan" }, - { identifier: "fpsLimiter", materialSymbol: "speed" }, + { identifier: "fpsLimiter", materialSymbol: "animation" }, { identifier: "volumeMixer", materialSymbol: "volume_up" } ] diff --git a/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiter.qml b/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiter.qml index fe3ab9df4..24cac5387 100644 --- a/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiter.qml +++ b/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiter.qml @@ -5,6 +5,6 @@ import qs.modules.overlay StyledOverlayWidget { id: root - title: "FPS Limiter" + title: "MangoHud FPS" contentItem: FpsLimiterContent {} } diff --git a/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml b/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml index fae1aca78..c83e83de9 100644 --- a/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml +++ b/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml @@ -1,3 +1,4 @@ +import qs.services import QtQuick import QtQuick.Layouts import QtQuick.Controls @@ -10,12 +11,33 @@ Rectangle { id: root color: Appearance.m3colors.m3surfaceContainer property real padding: 20 + property bool showCheckIcon: false + property bool showError: false implicitWidth: contentColumn.implicitWidth + padding * 2 implicitHeight: contentColumn.implicitHeight + padding * 2 + Timer { + id: iconResetTimer + interval: 1000 + onTriggered: { + root.showCheckIcon = false; + } + } + + Timer { + id: errorResetTimer + interval: 1000 + onTriggered: { + root.showError = false; + } + } + function applyLimit() { var fpsValue = parseInt(fpsField.text); if (isNaN(fpsValue) || fpsValue < 0) { + root.showError = true; + errorResetTimer.restart(); + fpsField.text = ""; return; } @@ -34,6 +56,9 @@ Rectangle { fpsSetter.command = ["bash", "-c", cmd]; fpsSetter.startDetached(); + root.showCheckIcon = true; + iconResetTimer.restart(); + // Clear the field after applying fpsField.text = ""; } @@ -41,7 +66,7 @@ Rectangle { Keys.onPressed: event => { if (event.key === Qt.Key_Escape) { fpsField.text = ""; - event.accepted = true; + event.onAccepted(); } } @@ -58,13 +83,13 @@ Rectangle { id: fpsField Layout.fillWidth: true Layout.preferredWidth: 200 - placeholderText: qsTr("Set FPS limit (e.g. 80)") + placeholderText: root.showError ? Translation.tr("Insert a valid number!") : Translation.tr("Set FPS limit (e.g. 80)") inputMethodHints: Qt.ImhDigitsOnly focus: true Keys.onReturnPressed: { root.applyLimit(); - event.accepted = true; + event.onAccepted(); } } @@ -80,7 +105,22 @@ Rectangle { anchors.centerIn: parent horizontalAlignment: Text.AlignHCenter font.pixelSize: Appearance.font.pixelSize.title - text: "keyboard_return" + text: root.showError ? "close" : (root.showCheckIcon ? "check" : "save") + rotation: (root.showCheckIcon || root.showError) ? 360 : 0 + color: root.showError ? "#ef5350" : (root.showCheckIcon ? Appearance.m3colors.m3primary : Appearance.m3colors.m3onSurface) + + Behavior on rotation { + NumberAnimation { + duration: 200 + easing.type: Easing.OutCubic + } + } + + Behavior on color { + ColorAnimation { + duration: 200 + } + } } } } From 7f49daf422a0f5f4dcbd2f1eaffe0cf9a6301f01 Mon Sep 17 00:00:00 2001 From: reakjra Date: Thu, 6 Nov 2025 22:44:40 +0100 Subject: [PATCH 22/44] undo personal edits by mistake --- .../.config/quickshell/ii/modules/overlay/Overlay.qml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/overlay/Overlay.qml b/dots/.config/quickshell/ii/modules/overlay/Overlay.qml index efb37cd89..2fd33fcd7 100644 --- a/dots/.config/quickshell/ii/modules/overlay/Overlay.qml +++ b/dots/.config/quickshell/ii/modules/overlay/Overlay.qml @@ -47,23 +47,12 @@ Scope { id: grab windows: [overlayWindow] active: GlobalStates.overlayOpen - onActiveChanged: { - if (active) { - // Quick workspace flick to unlock cursor from game's relative mode - cursorUnlockProcess.running = true; - } - } onCleared: () => { if (!active) GlobalStates.overlayOpen = false; } } - Process { - id: cursorUnlockProcess - command: ["bash", "-c", "ws=$(hyprctl activeworkspace -j | jq -r '.id'); hyprctl --batch \"keyword animations:enabled 0 ; dispatch workspace empty ; dispatch workspace $ws ; keyword animations:enabled 1\""] - } - OverlayContent { id: overlayContent anchors.fill: parent From b06a7ce58e44228e1178f0bf28ff35a478aa587a Mon Sep 17 00:00:00 2001 From: Madjid Taha Date: Fri, 7 Nov 2025 02:42:51 +0100 Subject: [PATCH 23/44] fix merge --- .../ii/modules/settings/InterfaceConfig.qml | 434 ------------------ 1 file changed, 434 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 8e4aab5ab..c57406a7f 100644 --- a/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -7,401 +7,6 @@ import qs.modules.common.widgets ContentPage { forceWidth: true - ContentSection { - icon: "wallpaper" - title: Translation.tr("Background") - - ConfigSwitch { - buttonIcon: "nest_clock_farsight_analog" - text: Translation.tr("Show clock") - checked: Config.options.background.clock.show - onCheckedChanged: { - Config.options.background.clock.show = checked; - } - } - - - ConfigSpinBox { - icon: "loupe" - text: Translation.tr("Scale (%)") - value: Config.options.background.clock.scale * 100 - from: 1 - to: 200 - stepSize: 2 - onValueChanged: { - Config.options.background.clock.scale = value / 100; - } - } - - ContentSubsection { - title: Translation.tr("Clock style") - ConfigSelectionArray { - currentValue: Config.options.background.clock.style - onSelected: newValue => { - Config.options.background.clock.style = newValue; - } - options: [ - { - displayName: Translation.tr("Simple digital"), - icon: "timer_10", - value: "digital" - }, - { - displayName: Translation.tr("Material cookie"), - icon: "cookie", - value: "cookie" - } - ] - } - } - - ContentSubsection { - visible: Config.options.background.clock.style === "digital" - title: Translation.tr("Digital clock settings") - - ConfigSwitch { - buttonIcon: "animation" - text: Translation.tr("Animate time change") - checked: Config.options.background.clock.digital.animateChange - onCheckedChanged: { - Config.options.background.clock.digital.animateChange = checked; - } - } - } - - ContentSubsection { - visible: Config.options.background.clock.style === "cookie" - title: Translation.tr("Cookie clock settings") - - ConfigSwitch { - buttonIcon: "wand_stars" - text: Translation.tr("Auto styling with Gemini") - checked: Config.options.background.clock.cookie.aiStyling - onCheckedChanged: { - Config.options.background.clock.cookie.aiStyling = checked; - } - StyledToolTip { - text: Translation.tr("Uses Gemini to categorize the wallpaper then picks a preset based on it.\nYou'll need to set Gemini API key on the left sidebar first.\nImages are downscaled for performance, but just to be safe,\ndo not select wallpapers with sensitive information.") - } - } - - ConfigSwitch { - buttonIcon: "airwave" - text: Translation.tr("Use old sine wave cookie implementation") - checked: Config.options.background.clock.cookie.useSineCookie - onCheckedChanged: { - Config.options.background.clock.cookie.useSineCookie = checked; - } - StyledToolTip { - text: "Looks a bit softer and more consistent with different number of sides,\nbut has less impressive morphing" - } - } - - ConfigSpinBox { - icon: "add_triangle" - text: Translation.tr("Sides") - value: Config.options.background.clock.cookie.sides - from: 0 - to: 40 - stepSize: 1 - onValueChanged: { - Config.options.background.clock.cookie.sides = value; - } - } - - ConfigSwitch { - buttonIcon: "autoplay" - text: Translation.tr("Constantly rotate") - checked: Config.options.background.clock.cookie.constantlyRotate - onCheckedChanged: { - Config.options.background.clock.cookie.constantlyRotate = checked; - } - StyledToolTip { - text: "Makes the clock always rotate. This is extremely expensive\n(expect 50% usage on Intel UHD Graphics) and thus impractical." - } - } - - ConfigRow { - - ConfigSwitch { - enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle === "dots" || Config.options.background.clock.cookie.dialNumberStyle === "full" - buttonIcon: "brightness_7" - text: Translation.tr("Hour marks") - checked: Config.options.background.clock.cookie.hourMarks - onEnabledChanged: { - checked = Config.options.background.clock.cookie.hourMarks; - } - onCheckedChanged: { - Config.options.background.clock.cookie.hourMarks = checked; - } - StyledToolTip { - text: "Can only be turned on using the 'Dots' or 'Full' dial style for aesthetic reasons" - } - } - - ConfigSwitch { - enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle !== "numbers" - buttonIcon: "timer_10" - text: Translation.tr("Digits in the middle") - checked: Config.options.background.clock.cookie.timeIndicators - onEnabledChanged: { - checked = Config.options.background.clock.cookie.timeIndicators; - } - onCheckedChanged: { - Config.options.background.clock.cookie.timeIndicators = checked; - } - StyledToolTip { - text: "Can't be turned on when using 'Numbers' dial style for aesthetic reasons" - } - } - } - } - - ContentSubsection { - visible: Config.options.background.clock.style === "cookie" - title: Translation.tr("Dial style") - ConfigSelectionArray { - currentValue: Config.options.background.clock.cookie.dialNumberStyle - onSelected: newValue => { - Config.options.background.clock.cookie.dialNumberStyle = newValue; - if (newValue !== "dots" && newValue !== "full") { - Config.options.background.clock.cookie.hourMarks = false; - } - if (newValue === "numbers") { - Config.options.background.clock.cookie.timeIndicators = false; - } - } - options: [ - { - displayName: "", - icon: "block", - value: "none" - }, - { - displayName: Translation.tr("Dots"), - icon: "graph_6", - value: "dots" - }, - { - displayName: Translation.tr("Full"), - icon: "history_toggle_off", - value: "full" - }, - { - displayName: Translation.tr("Numbers"), - icon: "counter_1", - value: "numbers" - } - ] - } - } - - ContentSubsection { - visible: Config.options.background.clock.style === "cookie" - title: Translation.tr("Hour hand") - ConfigSelectionArray { - currentValue: Config.options.background.clock.cookie.hourHandStyle - onSelected: newValue => { - Config.options.background.clock.cookie.hourHandStyle = newValue; - } - options: [ - { - displayName: "", - icon: "block", - value: "hide" - }, - { - displayName: Translation.tr("Classic"), - icon: "radio", - value: "classic" - }, - { - displayName: Translation.tr("Hollow"), - icon: "circle", - value: "hollow" - }, - { - displayName: Translation.tr("Fill"), - icon: "eraser_size_5", - value: "fill" - }, - ] - } - } - - ContentSubsection { - visible: Config.options.background.clock.style === "cookie" - title: Translation.tr("Minute hand") - - ConfigSelectionArray { - currentValue: Config.options.background.clock.cookie.minuteHandStyle - onSelected: newValue => { - Config.options.background.clock.cookie.minuteHandStyle = newValue; - } - options: [ - { - displayName: "", - icon: "block", - value: "hide" - }, - { - displayName: Translation.tr("Classic"), - icon: "radio", - value: "classic" - }, - { - displayName: Translation.tr("Thin"), - icon: "line_end", - value: "thin" - }, - { - displayName: Translation.tr("Medium"), - icon: "eraser_size_2", - value: "medium" - }, - { - displayName: Translation.tr("Bold"), - icon: "eraser_size_4", - value: "bold" - }, - ] - } - } - - ContentSubsection { - visible: Config.options.background.clock.style === "cookie" - title: Translation.tr("Second hand") - - ConfigSelectionArray { - currentValue: Config.options.background.clock.cookie.secondHandStyle - onSelected: newValue => { - Config.options.background.clock.cookie.secondHandStyle = newValue; - } - options: [ - { - displayName: "", - icon: "block", - value: "hide" - }, - { - displayName: Translation.tr("Classic"), - icon: "radio", - value: "classic" - }, - { - displayName: Translation.tr("Line"), - icon: "line_end", - value: "line" - }, - { - displayName: Translation.tr("Dot"), - icon: "adjust", - value: "dot" - }, - ] - } - } - - ContentSubsection { - visible: Config.options.background.clock.style === "cookie" - title: Translation.tr("Date style") - - ConfigSelectionArray { - currentValue: Config.options.background.clock.cookie.dateStyle - onSelected: newValue => { - Config.options.background.clock.cookie.dateStyle = newValue; - } - options: [ - { - displayName: "", - icon: "block", - value: "hide" - }, - { - displayName: Translation.tr("Bubble"), - icon: "bubble_chart", - value: "bubble" - }, - { - displayName: Translation.tr("Border"), - icon: "rotate_right", - value: "border" - }, - { - displayName: Translation.tr("Rect"), - icon: "rectangle", - value: "rect" - } - ] - } - } - - ContentSubsection { - title: Translation.tr("Quote settings") - ConfigSwitch { - buttonIcon: "format_quote" - text: Translation.tr("Show quote") - checked: Config.options.background.showQuote - onCheckedChanged: { - Config.options.background.showQuote = checked; - } - } - MaterialTextArea { - Layout.fillWidth: true - placeholderText: Translation.tr("Quote") - text: Config.options.background.quote - wrapMode: TextEdit.Wrap - onTextChanged: { - Config.options.background.quote = text; - } - } - } - - ContentSubsection { - title: Translation.tr("Wallpaper parallax") - - ConfigSwitch { - buttonIcon: "unfold_more_double" - text: Translation.tr("Vertical") - checked: Config.options.background.parallax.vertical - onCheckedChanged: { - Config.options.background.parallax.vertical = checked; - } - } - - ConfigRow { - uniform: true - ConfigSwitch { - buttonIcon: "counter_1" - text: Translation.tr("Depends on workspace") - checked: Config.options.background.parallax.enableWorkspace - onCheckedChanged: { - Config.options.background.parallax.enableWorkspace = checked; - } - } - ConfigSwitch { - buttonIcon: "side_navigation" - text: Translation.tr("Depends on sidebars") - checked: Config.options.background.parallax.enableSidebar - onCheckedChanged: { - Config.options.background.parallax.enableSidebar = checked; - } - } - } - ConfigSpinBox { - icon: "loupe" - text: Translation.tr("Preferred wallpaper zoom (%)") - value: Config.options.background.parallax.workspaceZoom * 100 - from: 100 - to: 150 - stepSize: 1 - onValueChanged: { - Config.options.background.parallax.workspaceZoom = value / 100; - } - } - } - } - ContentSection { icon: "keyboard" title: Translation.tr("Cheat sheet") @@ -494,45 +99,6 @@ ContentPage { } } } - ContentSection { - icon: "point_scan" - title: Translation.tr("Crosshair overlay") - - MaterialTextArea { - Layout.fillWidth: true - placeholderText: Translation.tr("Crosshair code (in Valorant's format)") - text: Config.options.crosshair.code - wrapMode: TextEdit.Wrap - onTextChanged: { - Config.options.crosshair.code = text; - } - } - - 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 - buttonRadius: Appearance.rounding.full - materialIcon: "open_in_new" - mainText: Translation.tr("Open editor") - onClicked: { - Qt.openUrlExternally(`https://www.vcrdb.net/builder?c=${Config.options.crosshair.code}`); - } - StyledToolTip { - text: "www.vcrdb.net" - } - } - } - } - ContentSection { icon: "call_to_action" title: Translation.tr("Dock") From e5e85db75d69ff6cf6a8e87065d75efb68610cb0 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 7 Nov 2025 12:56:08 +0100 Subject: [PATCH 24/44] refractor secondary tab bar --- .../common/widgets/SecondaryTabBar.qml | 53 ++++++++++++ .../common/widgets/SecondaryTabButton.qml | 22 ++--- .../sidebarRight/pomodoro/PomodoroWidget.qml | 82 ++----------------- .../modules/sidebarRight/todo/TodoWidget.qml | 80 ++---------------- 4 files changed, 78 insertions(+), 159 deletions(-) create mode 100644 dots/.config/quickshell/ii/modules/common/widgets/SecondaryTabBar.qml diff --git a/dots/.config/quickshell/ii/modules/common/widgets/SecondaryTabBar.qml b/dots/.config/quickshell/ii/modules/common/widgets/SecondaryTabBar.qml new file mode 100644 index 000000000..dcb490048 --- /dev/null +++ b/dots/.config/quickshell/ii/modules/common/widgets/SecondaryTabBar.qml @@ -0,0 +1,53 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import qs.modules.common +import qs.modules.common.models + +TabBar { + id: root + property real indicatorPadding: 8 + Layout.fillWidth: true + + background: Item { + WheelHandler { + onWheel: (event) => { + if (event.angleDelta.y < 0) root.incrementCurrentIndex(); + else if (event.angleDelta.y > 0) root.decrementCurrentIndex(); + } + acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad + } + + Rectangle { + id: activeIndicator + z: 9999 + anchors.bottom: parent.bottom + topLeftRadius: height + topRightRadius: height + bottomLeftRadius: 0 + bottomRightRadius: 0 + color: Appearance.colors.colPrimary + // Animation + property real baseWidth: root.width / root.count + AnimatedTabIndexPair { + id: idxPair + index: root.currentIndex + } + height: 3 + x: Math.min(idxPair.idx1, idxPair.idx2) * baseWidth + root.indicatorPadding + width: ((Math.max(idxPair.idx1, idxPair.idx2) + 1) * baseWidth - root.indicatorPadding) - x + } + + Rectangle { // Tabbar bottom border + id: tabBarBottomBorder + z: 9998 + anchors.bottom: parent.bottom + height: 1 + anchors { + left: parent.left + right: parent.right + } + color: Appearance.colors.colOutlineVariant + } + } +} diff --git a/dots/.config/quickshell/ii/modules/common/widgets/SecondaryTabButton.qml b/dots/.config/quickshell/ii/modules/common/widgets/SecondaryTabButton.qml index b1036c777..b0bc9b4de 100644 --- a/dots/.config/quickshell/ii/modules/common/widgets/SecondaryTabButton.qml +++ b/dots/.config/quickshell/ii/modules/common/widgets/SecondaryTabButton.qml @@ -1,6 +1,6 @@ import qs.modules.common -import qs.modules.common.widgets import qs.modules.common.functions +import qs.modules.common.widgets import Qt5Compat.GraphicalEffects import QtQuick import QtQuick.Controls @@ -10,14 +10,12 @@ TabButton { id: root property string buttonText property string buttonIcon - property bool selected: false property int rippleDuration: 1200 - height: buttonBackground.height property int tabContentWidth: buttonBackground.width - buttonBackground.radius*2 - property color colBackground: ColorUtils.transparentize(Appearance.colors.colLayer1Hover, 1) - property color colBackgroundHover: Appearance.colors.colLayer1Hover - property color colRipple: Appearance.colors.colLayer1Active + property color colBackground: ColorUtils.transparentize(Appearance.colors.colSurfaceContainer) + property color colBackgroundHover: ColorUtils.transparentize(Appearance.colors.colOnSurface, root.checked ? 1 : 0.95) + property color colRipple: ColorUtils.transparentize(Appearance.colors.colOnSurface, 0.95) PointingHandInteraction {} @@ -91,8 +89,12 @@ TabButton { background: Rectangle { id: buttonBackground + anchors { + fill: parent + margins: 3 + } radius: Appearance?.rounding.normal - implicitHeight: 37 + implicitHeight: 42 color: (root.hovered ? root.colBackgroundHover : root.colBackground) layer.enabled: true layer.effect: OpacityMask { @@ -156,8 +158,8 @@ TabButton { verticalAlignment: Text.AlignVCenter text: buttonIcon iconSize: Appearance.font.pixelSize.huge - fill: selected ? 1 : 0 - color: selected ? Appearance.colors.colPrimary : Appearance.colors.colOnLayer1 + fill: root.checked ? 1 : 0 + color: root.checked ? Appearance.colors.colPrimary : Appearance.colors.colOnLayer1 Behavior on color { animation: Appearance.animation.elementMoveFast.colorAnimation.createObject(this) } @@ -167,7 +169,7 @@ TabButton { id: buttonTextWidget verticalAlignment: Text.AlignVCenter font.pixelSize: Appearance.font.pixelSize.small - color: selected ? Appearance.colors.colPrimary : Appearance.colors.colOnLayer1 + color: root.checked ? Appearance.colors.colPrimary : Appearance.colors.colOnLayer1 text: buttonText Behavior on color { animation: Appearance.animation.elementMoveFast.colorAnimation.createObject(this) diff --git a/dots/.config/quickshell/ii/modules/sidebarRight/pomodoro/PomodoroWidget.qml b/dots/.config/quickshell/ii/modules/sidebarRight/pomodoro/PomodoroWidget.qml index ca7723db3..a62a9616c 100644 --- a/dots/.config/quickshell/ii/modules/sidebarRight/pomodoro/PomodoroWidget.qml +++ b/dots/.config/quickshell/ii/modules/sidebarRight/pomodoro/PomodoroWidget.qml @@ -7,7 +7,6 @@ import QtQuick.Layouts Item { id: root - property int currentTab: 0 property var tabButtonList: [ {"name": Translation.tr("Pomodoro"), "icon": "search_activity"}, {"name": Translation.tr("Stopwatch"), "icon": "timer"} @@ -17,20 +16,20 @@ Item { Keys.onPressed: (event) => { if ((event.key === Qt.Key_PageDown || event.key === Qt.Key_PageUp) && event.modifiers === Qt.NoModifier) { // Switch tabs if (event.key === Qt.Key_PageDown) { - currentTab = Math.min(currentTab + 1, root.tabButtonList.length - 1) + tabBar.incrementCurrentIndex(); } else if (event.key === Qt.Key_PageUp) { - currentTab = Math.max(currentTab - 1, 0) + tabBar.decrementCurrentIndex(); } event.accepted = true } else if (event.key === Qt.Key_Space || event.key === Qt.Key_S) { // Pause/resume with Space or S - if (currentTab === 0) { + if (tabBar.currentIndex === 0) { TimerService.togglePomodoro() } else { TimerService.toggleStopwatch() } event.accepted = true } else if (event.key === Qt.Key_R) { // Reset with R - if (currentTab === 0) { + if (tabBar.currentIndex === 0) { TimerService.resetPomodoro() } else { TimerService.stopwatchReset() @@ -46,82 +45,19 @@ Item { anchors.fill: parent spacing: 0 - TabBar { + SecondaryTabBar { id: tabBar - Layout.fillWidth: true - currentIndex: currentTab - onCurrentIndexChanged: currentTab = currentIndex - - background: Item { - WheelHandler { - onWheel: (event) => { - if (event.angleDelta.y < 0) - tabBar.currentIndex = Math.min(tabBar.currentIndex + 1, root.tabButtonList.length - 1) - else if (event.angleDelta.y > 0) - tabBar.currentIndex = Math.max(tabBar.currentIndex - 1, 0) - } - acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad - } - } + currentIndex: swipeView.currentIndex Repeater { model: root.tabButtonList delegate: SecondaryTabButton { - selected: (index == currentTab) buttonText: modelData.name buttonIcon: modelData.icon } } } - Item { // Tab indicator - id: tabIndicator - Layout.fillWidth: true - height: 3 - property bool enableIndicatorAnimation: false - Connections { - target: root - function onCurrentTabChanged() { - tabIndicator.enableIndicatorAnimation = true - } - } - - Rectangle { - id: indicator - property int tabCount: root.tabButtonList.length - property real fullTabSize: root.width / tabCount; - property real targetWidth: tabBar.contentItem.children[0].children[tabBar.currentIndex].tabContentWidth - - implicitWidth: targetWidth - anchors { - top: parent.top - bottom: parent.bottom - } - - x: tabBar.currentIndex * fullTabSize + (fullTabSize - targetWidth) / 2 - - color: Appearance.colors.colPrimary - radius: Appearance.rounding.full - - Behavior on x { - enabled: tabIndicator.enableIndicatorAnimation - animation: Appearance.animation.elementMove.numberAnimation.createObject(this) - } - - Behavior on implicitWidth { - enabled: tabIndicator.enableIndicatorAnimation - animation: Appearance.animation.elementMove.numberAnimation.createObject(this) - } - } - } - - Rectangle { // Tabbar bottom border - id: tabBarBottomBorder - Layout.fillWidth: true - height: 1 - color: Appearance.colors.colOutlineVariant - } - SwipeView { id: swipeView Layout.topMargin: 10 @@ -129,11 +65,7 @@ Item { Layout.fillHeight: true spacing: 10 clip: true - currentIndex: currentTab - onCurrentIndexChanged: { - tabIndicator.enableIndicatorAnimation = true - currentTab = currentIndex - } + currentIndex: tabBar.currentIndex // Tabs PomodoroTimer {} diff --git a/dots/.config/quickshell/ii/modules/sidebarRight/todo/TodoWidget.qml b/dots/.config/quickshell/ii/modules/sidebarRight/todo/TodoWidget.qml index 99b0100f5..36c885523 100644 --- a/dots/.config/quickshell/ii/modules/sidebarRight/todo/TodoWidget.qml +++ b/dots/.config/quickshell/ii/modules/sidebarRight/todo/TodoWidget.qml @@ -7,7 +7,6 @@ import QtQuick.Layouts Item { id: root - property int currentTab: 0 property var tabButtonList: [{"icon": "checklist", "name": Translation.tr("Unfinished")}, {"name": Translation.tr("Done"), "icon": "check_circle"}] property bool showAddDialog: false property int dialogMargins: 20 @@ -17,9 +16,9 @@ Item { Keys.onPressed: (event) => { if ((event.key === Qt.Key_PageDown || event.key === Qt.Key_PageUp) && event.modifiers === Qt.NoModifier) { if (event.key === Qt.Key_PageDown) { - currentTab = Math.min(currentTab + 1, root.tabButtonList.length - 1) + tabBar.incrementCurrentIndex(); } else if (event.key === Qt.Key_PageUp) { - currentTab = Math.max(currentTab - 1, 0) + tabBar.decrementCurrentIndex(); } event.accepted = true; } @@ -39,82 +38,19 @@ Item { anchors.fill: parent spacing: 0 - TabBar { + SecondaryTabBar { id: tabBar - Layout.fillWidth: true - currentIndex: currentTab - onCurrentIndexChanged: currentTab = currentIndex - - background: Item { - WheelHandler { - onWheel: (event) => { - if (event.angleDelta.y < 0) - tabBar.currentIndex = Math.min(tabBar.currentIndex + 1, root.tabButtonList.length - 1) - else if (event.angleDelta.y > 0) - tabBar.currentIndex = Math.max(tabBar.currentIndex - 1, 0) - } - acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad - } - } + currentIndex: swipeView.currentIndex Repeater { model: root.tabButtonList delegate: SecondaryTabButton { - selected: (index == currentTab) buttonText: modelData.name buttonIcon: modelData.icon } } } - Item { // Tab indicator - id: tabIndicator - Layout.fillWidth: true - height: 3 - property bool enableIndicatorAnimation: false - Connections { - target: root - function onCurrentTabChanged() { - tabIndicator.enableIndicatorAnimation = true - } - } - - Rectangle { - id: indicator - property int tabCount: root.tabButtonList.length - property real fullTabSize: root.width / tabCount; - property real targetWidth: tabBar?.contentItem?.children[0]?.children[tabBar.currentIndex]?.tabContentWidth ?? 0 - - implicitWidth: targetWidth - anchors { - top: parent.top - bottom: parent.bottom - } - - x: tabBar.currentIndex * fullTabSize + (fullTabSize - targetWidth) / 2 - - color: Appearance.colors.colPrimary - radius: Appearance.rounding.full - - Behavior on x { - enabled: tabIndicator.enableIndicatorAnimation - animation: Appearance.animation.elementMove.numberAnimation.createObject(this) - } - - Behavior on implicitWidth { - enabled: tabIndicator.enableIndicatorAnimation - animation: Appearance.animation.elementMove.numberAnimation.createObject(this) - } - } - } - - Rectangle { // Tabbar bottom border - id: tabBarBottomBorder - Layout.fillWidth: true - height: 1 - color: Appearance.colors.colOutlineVariant - } - SwipeView { id: swipeView Layout.topMargin: 10 @@ -122,11 +58,7 @@ Item { Layout.fillHeight: true spacing: 10 clip: true - currentIndex: currentTab - onCurrentIndexChanged: { - tabIndicator.enableIndicatorAnimation = true - currentTab = currentIndex - } + currentIndex: tabBar.currentIndex // To Do tab TaskList { @@ -215,7 +147,7 @@ Item { Todo.addTask(todoInput.text) todoInput.text = "" root.showAddDialog = false - root.currentTab = 0 // Show unfinished tasks + tabBar.setCurrentIndex(0) // Show unfinished tasks } } From a27a6deddfc9c770d1aa2556835d019c6388d7ff Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 7 Nov 2025 12:56:44 +0100 Subject: [PATCH 25/44] overlay: add resource monitor widget --- .../quickshell/ii/modules/common/Config.qml | 1 + .../ii/modules/common/Persistent.qml | 7 + .../ii/modules/common/widgets/Graph.qml | 51 +++++++ .../ii/modules/overlay/OverlayContext.qml | 5 +- .../overlay/OverlayWidgetDelegateChooser.qml | 2 + .../ii/modules/overlay/recorder/Recorder.qml | 1 - .../modules/overlay/resources/Resources.qml | 134 ++++++++++++++++++ .../quickshell/ii/services/ResourceUsage.qml | 83 +++++++++-- 8 files changed, 272 insertions(+), 12 deletions(-) create mode 100644 dots/.config/quickshell/ii/modules/common/widgets/Graph.qml create mode 100644 dots/.config/quickshell/ii/modules/overlay/resources/Resources.qml diff --git a/dots/.config/quickshell/ii/modules/common/Config.qml b/dots/.config/quickshell/ii/modules/common/Config.qml index 55c9c94a8..d064d2533 100644 --- a/dots/.config/quickshell/ii/modules/common/Config.qml +++ b/dots/.config/quickshell/ii/modules/common/Config.qml @@ -411,6 +411,7 @@ Singleton { property JsonObject resources: JsonObject { property int updateInterval: 3000 + property int historyLength: 60 } property JsonObject musicRecognition: JsonObject { diff --git a/dots/.config/quickshell/ii/modules/common/Persistent.qml b/dots/.config/quickshell/ii/modules/common/Persistent.qml index 5335deb9d..f40fdf6cb 100644 --- a/dots/.config/quickshell/ii/modules/common/Persistent.qml +++ b/dots/.config/quickshell/ii/modules/common/Persistent.qml @@ -93,6 +93,13 @@ Singleton { property real x: 100 property real y: 130 } + property JsonObject resources: JsonObject { + property bool pinned: false + property bool clickthrough: true + property real x: 1000 + property real y: 320 + property int tabIndex: 0 + } property JsonObject volumeMixer: JsonObject { property bool pinned: false property bool clickthrough: false diff --git a/dots/.config/quickshell/ii/modules/common/widgets/Graph.qml b/dots/.config/quickshell/ii/modules/common/widgets/Graph.qml new file mode 100644 index 000000000..4747e5665 --- /dev/null +++ b/dots/.config/quickshell/ii/modules/common/widgets/Graph.qml @@ -0,0 +1,51 @@ +import QtQuick +import qs.modules.common +import qs.modules.common.functions + +/* + * Simple one value line graph + */ +Canvas { + id: root + + enum Alignment { Left, Right } + + required property list values + property int points: values.length + property color color: Appearance.colors.colPrimary + property real fillOpacity: 0.5 + property var alignment: Graph.Alignment.Left + + onValuesChanged: root.requestPaint() + onPaint: { + var ctx = getContext("2d") + ctx.clearRect(0, 0, width, height) + if (!root.values || root.values.length < 2) + return + + var n = root.points + var dx = width / (n - 1) + ctx.strokeStyle = root.color + ctx.fillStyle = ColorUtils.transparentize(root.color, 1 - root.fillOpacity) + ctx.lineWidth = 2 + ctx.beginPath() + for (var i = 0; i < n; ++i) { + var valueIndex = (root.alignment === Graph.Alignment.Right) ? root.values.length - n + i : i + if (valueIndex < 0 || valueIndex >= root.values.length) { + continue; // No data for this point + } + var x = i * dx + var norm = root.values[valueIndex] // already in 0-1 range + var y = height - norm * height + if (valueIndex === 0) { + ctx.moveTo(x, height) + ctx.lineTo(x, y) + } else { + ctx.lineTo(x, y) + } + } + ctx.stroke() + ctx.lineTo(width, height) + ctx.fill() + } +} diff --git a/dots/.config/quickshell/ii/modules/overlay/OverlayContext.qml b/dots/.config/quickshell/ii/modules/overlay/OverlayContext.qml index 22746c4de..c13b1933c 100644 --- a/dots/.config/quickshell/ii/modules/overlay/OverlayContext.qml +++ b/dots/.config/quickshell/ii/modules/overlay/OverlayContext.qml @@ -6,9 +6,10 @@ Singleton { id: root readonly property list availableWidgets: [ - { identifier: "crosshair", materialSymbol: "point_scan" }, - { identifier: "volumeMixer", materialSymbol: "volume_up" }, { identifier: "recorder", materialSymbol: "screen_record" }, + { identifier: "volumeMixer", materialSymbol: "volume_up" }, + { identifier: "crosshair", materialSymbol: "point_scan" }, + { identifier: "resources", materialSymbol: "browse_activity" } ] readonly property bool hasPinnedWidgets: root.pinnedWidgetIdentifiers.length > 0 diff --git a/dots/.config/quickshell/ii/modules/overlay/OverlayWidgetDelegateChooser.qml b/dots/.config/quickshell/ii/modules/overlay/OverlayWidgetDelegateChooser.qml index 39df62ac3..90f85a7fd 100644 --- a/dots/.config/quickshell/ii/modules/overlay/OverlayWidgetDelegateChooser.qml +++ b/dots/.config/quickshell/ii/modules/overlay/OverlayWidgetDelegateChooser.qml @@ -9,6 +9,7 @@ import Quickshell.Bluetooth import qs.modules.overlay.crosshair import qs.modules.overlay.volumeMixer import qs.modules.overlay.recorder +import qs.modules.overlay.resources DelegateChooser { id: root @@ -17,4 +18,5 @@ DelegateChooser { DelegateChoice { roleValue: "crosshair"; Crosshair {} } DelegateChoice { roleValue: "volumeMixer"; VolumeMixer {} } DelegateChoice { roleValue: "recorder"; Recorder {} } + DelegateChoice { roleValue: "resources"; Resources {} } } diff --git a/dots/.config/quickshell/ii/modules/overlay/recorder/Recorder.qml b/dots/.config/quickshell/ii/modules/overlay/recorder/Recorder.qml index d32adedea..78d747ed6 100644 --- a/dots/.config/quickshell/ii/modules/overlay/recorder/Recorder.qml +++ b/dots/.config/quickshell/ii/modules/overlay/recorder/Recorder.qml @@ -2,7 +2,6 @@ pragma ComponentBehavior: Bound import QtQuick import QtQuick.Layouts import Quickshell -import Quickshell.Hyprland import qs import qs.modules.common import qs.modules.common.widgets diff --git a/dots/.config/quickshell/ii/modules/overlay/resources/Resources.qml b/dots/.config/quickshell/ii/modules/overlay/resources/Resources.qml new file mode 100644 index 000000000..f5f5ff286 --- /dev/null +++ b/dots/.config/quickshell/ii/modules/overlay/resources/Resources.qml @@ -0,0 +1,134 @@ +pragma ComponentBehavior: Bound +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import Quickshell +import Quickshell.Hyprland +import Qt5Compat.GraphicalEffects +import Qt.labs.synchronizer +import qs +import qs.services +import qs.modules.common +import qs.modules.common.widgets +import qs.modules.overlay + +StyledOverlayWidget { + id: root + property list resources: [ + { + "icon": "planner_review", + "name": Translation.tr("CPU"), + "history": ResourceUsage.cpuUsageHistory, + "maxAvailableString": ResourceUsage.maxAvailableCpuString + }, + { + "icon": "memory", + "name": Translation.tr("RAM"), + "history": ResourceUsage.memoryUsageHistory, + "maxAvailableString": ResourceUsage.maxAvailableMemoryString + }, + { + "icon": "swap_horiz", + "name": Translation.tr("Swap"), + "history": ResourceUsage.swapUsageHistory, + "maxAvailableString": ResourceUsage.maxAvailableSwapString + }, + ] + + contentItem: Rectangle { + id: contentItem + anchors.centerIn: parent + color: Appearance.m3colors.m3surfaceContainer + property real padding: 4 + implicitWidth: 350 + implicitHeight: 200 + // implicitHeight: contentColumn.implicitHeight + padding * 2 + ColumnLayout { + id: contentColumn + anchors { + fill: parent + margins: parent.padding + } + spacing: 10 + + SecondaryTabBar { + id: tabBar + + currentIndex: Persistent.states.overlay.resources.tabIndex + onCurrentIndexChanged: { + Persistent.states.overlay.resources.tabIndex = tabBar.currentIndex; + } + + Repeater { + model: root.resources.length + delegate: SecondaryTabButton { + required property int index + property var modelData: root.resources[index] + buttonIcon: modelData.icon + buttonText: modelData.name + } + } + } + + ResourceSummary { + Layout.margins: 8 + history: root.resources[tabBar.currentIndex]?.history ?? [] + maxAvailableString: root.resources[tabBar.currentIndex]?.maxAvailableString ?? "--" + } + } + } + + component ResourceSummary: RowLayout { + id: resourceSummary + required property list history + required property string maxAvailableString + Layout.fillWidth: true + Layout.fillHeight: true + spacing: 12 + + ColumnLayout { + spacing: 2 + StyledText { + text: (resourceSummary.history[resourceSummary.history.length - 1] * 100).toFixed(1) + "%" + font { + family: Appearance.font.family.numbers + variableAxes: Appearance.font.variableAxes.numbers + pixelSize: Appearance.font.pixelSize.huge + } + } + StyledText { + text: Translation.tr("of %1").arg(resourceSummary.maxAvailableString) + font { + // family: Appearance.font.family.numbers + // variableAxes: Appearance.font.variableAxes.numbers + pixelSize: Appearance.font.pixelSize.smallie + } + color: Appearance.colors.colSubtext + } + Item { + Layout.fillHeight: true + } + } + Rectangle { + id: graphBg + Layout.fillWidth: true + Layout.fillHeight: true + radius: Appearance.rounding.small + color: Appearance.colors.colSecondaryContainer + layer.enabled: true + layer.effect: OpacityMask { + maskSource: Rectangle { + width: graphBg.width + height: graphBg.height + radius: graphBg.radius + } + } + Graph { + anchors.fill: parent + values: root.resources[tabBar.currentIndex]?.history ?? [] + points: ResourceUsage.historyLength + alignment: Graph.Alignment.Right + } + } + } +} diff --git a/dots/.config/quickshell/ii/services/ResourceUsage.qml b/dots/.config/quickshell/ii/services/ResourceUsage.qml index 650528408..e42022cb5 100644 --- a/dots/.config/quickshell/ii/services/ResourceUsage.qml +++ b/dots/.config/quickshell/ii/services/ResourceUsage.qml @@ -10,17 +10,55 @@ import Quickshell.Io * Simple polled resource usage service with RAM, Swap, and CPU usage. */ Singleton { - property double memoryTotal: 1 - property double memoryFree: 1 - property double memoryUsed: memoryTotal - memoryFree - property double memoryUsedPercentage: memoryUsed / memoryTotal - property double swapTotal: 1 - property double swapFree: 1 - property double swapUsed: swapTotal - swapFree - property double swapUsedPercentage: swapTotal > 0 ? (swapUsed / swapTotal) : 0 - property double cpuUsage: 0 + id: root + property real memoryTotal: 1 + property real memoryFree: 0 + property real memoryUsed: memoryTotal - memoryFree + property real memoryUsedPercentage: memoryUsed / memoryTotal + property real swapTotal: 1 + property real swapFree: 0 + property real swapUsed: swapTotal - swapFree + property real swapUsedPercentage: swapTotal > 0 ? (swapUsed / swapTotal) : 0 + property real cpuUsage: 0 property var previousCpuStats + property string maxAvailableMemoryString: kbToGbString(ResourceUsage.memoryTotal) + property string maxAvailableSwapString: kbToGbString(ResourceUsage.swapTotal) + property string maxAvailableCpuString: "--" + + readonly property int historyLength: Config?.options.resources.historyLength ?? 60 + property list cpuUsageHistory: [] + property list memoryUsageHistory: [] + property list swapUsageHistory: [] + + function kbToGbString(kb) { + return (kb / (1024 * 1024)).toFixed(1) + " GB"; + } + + function updateMemoryUsageHistory() { + memoryUsageHistory = [...memoryUsageHistory, memoryUsedPercentage] + if (memoryUsageHistory.length > historyLength) { + memoryUsageHistory.shift() + } + } + function updateSwapUsageHistory() { + swapUsageHistory = [...swapUsageHistory, swapUsedPercentage] + if (swapUsageHistory.length > historyLength) { + swapUsageHistory.shift() + } + } + function updateCpuUsageHistory() { + cpuUsageHistory = [...cpuUsageHistory, cpuUsage] + if (cpuUsageHistory.length > historyLength) { + cpuUsageHistory.shift() + } + } + function updateHistories() { + updateMemoryUsageHistory() + updateSwapUsageHistory() + updateCpuUsageHistory() + } + Timer { interval: 1 running: true @@ -29,6 +67,7 @@ Singleton { // Reload files fileMeminfo.reload() fileStat.reload() + fileCpuinfo.reload() // Parse memory and swap usage const textMeminfo = fileMeminfo.text() @@ -53,10 +92,36 @@ Singleton { previousCpuStats = { total, idle } } + + // Parse max CPU frequency + const textCpuinfo = fileCpuinfo.text() + // Try to find 'cpu max MHz', fallback to highest 'cpu MHz' + let maxMHz = 0 + let match + // Try cpu max MHz (modern kernels) + match = textCpuinfo.match(/cpu max MHz\s*:\s*([\d.]+)/) + if (match) { + maxMHz = Number(match[1]) + } else { + // Fallback: find all cpu MHz lines and take the max + let mhzRegex = /cpu MHz\s*:\s*([\d.]+)/g + let mhzMatch + let mhzList = [] + while ((mhzMatch = mhzRegex.exec(textCpuinfo)) !== null) { + mhzList.push(Number(mhzMatch[1])) + } + if (mhzList.length > 0) { + maxMHz = Math.max.apply(null, mhzList) + } + } + root.maxAvailableCpuString = maxMHz > 0 ? (maxMHz / 1000).toFixed(1) + "GHz" : "--" + + root.updateHistories() interval = Config.options?.resources?.updateInterval ?? 3000 } } FileView { id: fileMeminfo; path: "/proc/meminfo" } FileView { id: fileStat; path: "/proc/stat" } + FileView { id: fileCpuinfo; path: "/proc/cpuinfo" } } From 0f867df271ee7f6fa169f25a1bc73c6d8c7db923 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 7 Nov 2025 13:02:34 +0100 Subject: [PATCH 26/44] overlay: better default positions --- .../quickshell/ii/modules/common/Persistent.qml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/common/Persistent.qml b/dots/.config/quickshell/ii/modules/common/Persistent.qml index f40fdf6cb..f2de212c9 100644 --- a/dots/.config/quickshell/ii/modules/common/Persistent.qml +++ b/dots/.config/quickshell/ii/modules/common/Persistent.qml @@ -80,7 +80,7 @@ Singleton { } property JsonObject overlay: JsonObject { - property list open: ["crosshair"] + property list open: ["crosshair", "recorder", "volumeMixer", "resources"] property JsonObject crosshair: JsonObject { property bool pinned: false property bool clickthrough: true @@ -90,21 +90,21 @@ Singleton { property JsonObject recorder: JsonObject { property bool pinned: false property bool clickthrough: false - property real x: 100 - property real y: 130 + property real x: 80 + property real y: 80 } property JsonObject resources: JsonObject { property bool pinned: false property bool clickthrough: true - property real x: 1000 - property real y: 320 + property real x: 1500 + property real y: 770 property int tabIndex: 0 } property JsonObject volumeMixer: JsonObject { property bool pinned: false property bool clickthrough: false - property real x: 100 - property real y: 320 + property real x: 80 + property real y: 250 } } From 1766375348bae573ae2061c877456db73dfb9211 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 7 Nov 2025 14:00:17 +0100 Subject: [PATCH 27/44] fix weird max cpu freq --- .../quickshell/ii/services/ResourceUsage.qml | 37 ++++++------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/dots/.config/quickshell/ii/services/ResourceUsage.qml b/dots/.config/quickshell/ii/services/ResourceUsage.qml index e42022cb5..df823adf7 100644 --- a/dots/.config/quickshell/ii/services/ResourceUsage.qml +++ b/dots/.config/quickshell/ii/services/ResourceUsage.qml @@ -67,7 +67,6 @@ Singleton { // Reload files fileMeminfo.reload() fileStat.reload() - fileCpuinfo.reload() // Parse memory and swap usage const textMeminfo = fileMeminfo.text() @@ -93,29 +92,6 @@ Singleton { previousCpuStats = { total, idle } } - // Parse max CPU frequency - const textCpuinfo = fileCpuinfo.text() - // Try to find 'cpu max MHz', fallback to highest 'cpu MHz' - let maxMHz = 0 - let match - // Try cpu max MHz (modern kernels) - match = textCpuinfo.match(/cpu max MHz\s*:\s*([\d.]+)/) - if (match) { - maxMHz = Number(match[1]) - } else { - // Fallback: find all cpu MHz lines and take the max - let mhzRegex = /cpu MHz\s*:\s*([\d.]+)/g - let mhzMatch - let mhzList = [] - while ((mhzMatch = mhzRegex.exec(textCpuinfo)) !== null) { - mhzList.push(Number(mhzMatch[1])) - } - if (mhzList.length > 0) { - maxMHz = Math.max.apply(null, mhzList) - } - } - root.maxAvailableCpuString = maxMHz > 0 ? (maxMHz / 1000).toFixed(1) + "GHz" : "--" - root.updateHistories() interval = Config.options?.resources?.updateInterval ?? 3000 } @@ -123,5 +99,16 @@ Singleton { FileView { id: fileMeminfo; path: "/proc/meminfo" } FileView { id: fileStat; path: "/proc/stat" } - FileView { id: fileCpuinfo; path: "/proc/cpuinfo" } + + Process { + id: findCpuMaxFreqProc + command: ["bash", "-c", "lscpu | grep 'CPU max MHz' | awk '{print $4}'"] + running: true + stdout: StdioCollector { + id: outputCollector + onStreamFinished: { + root.maxAvailableCpuString = (parseFloat(outputCollector.text) / 1000).toFixed(0) + " GHz" + } + } + } } From fd8f569477776c34302747a7f4db26e49b75b8cc Mon Sep 17 00:00:00 2001 From: "Celestial.y" Date: Fri, 7 Nov 2025 22:27:44 +0800 Subject: [PATCH 28/44] Add comment (#2220) --- dots/.config/hypr/hyprland/execs.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dots/.config/hypr/hyprland/execs.conf b/dots/.config/hypr/hyprland/execs.conf index 252e3afa8..c273da531 100644 --- a/dots/.config/hypr/hyprland/execs.conf +++ b/dots/.config/hypr/hyprland/execs.conf @@ -23,3 +23,5 @@ exec-once = wl-paste --type image --watch bash -c 'cliphist store && qs -c $qsCo # Cursor exec-once = hyprctl setcursor Bibata-Modern-Classic 24 +# Fix dock pinned apps not launching properly (https://github.com/end-4/dots-hyprland/issues/2200) +# exec-once = sleep 3.5 && hyprctl reload && sleep 0.5 && touch ~/.config/quickshell/ii/shell.qml From e50ea627e80df3b417cb51d3a0ba4e9c2b105bba Mon Sep 17 00:00:00 2001 From: reakjra Date: Fri, 7 Nov 2025 16:28:45 +0100 Subject: [PATCH 29/44] Fix non-sensical logic, timers and animations. --- .../overlay/fpsLimiter/FpsLimiterContent.qml | 55 ++++++------------- 1 file changed, 17 insertions(+), 38 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml b/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml index c83e83de9..f971258aa 100644 --- a/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml +++ b/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml @@ -10,9 +10,8 @@ import qs.modules.common.widgets Rectangle { id: root color: Appearance.m3colors.m3surfaceContainer - property real padding: 20 - property bool showCheckIcon: false - property bool showError: false + property real padding: 16 + property string iconState: "normal" implicitWidth: contentColumn.implicitWidth + padding * 2 implicitHeight: contentColumn.implicitHeight + padding * 2 @@ -20,23 +19,15 @@ Rectangle { id: iconResetTimer interval: 1000 onTriggered: { - root.showCheckIcon = false; - } - } - - Timer { - id: errorResetTimer - interval: 1000 - onTriggered: { - root.showError = false; + root.iconState = "normal"; } } function applyLimit() { var fpsValue = parseInt(fpsField.text); if (isNaN(fpsValue) || fpsValue < 0) { - root.showError = true; - errorResetTimer.restart(); + root.iconState = "error"; + iconResetTimer.restart(); fpsField.text = ""; return; } @@ -56,20 +47,13 @@ Rectangle { fpsSetter.command = ["bash", "-c", cmd]; fpsSetter.startDetached(); - root.showCheckIcon = true; + root.iconState = "success"; iconResetTimer.restart(); // Clear the field after applying fpsField.text = ""; } - Keys.onPressed: event => { - if (event.key === Qt.Key_Escape) { - fpsField.text = ""; - event.onAccepted(); - } - } - ColumnLayout { id: contentColumn anchors.centerIn: parent @@ -82,21 +66,21 @@ Rectangle { ToolbarTextField { id: fpsField Layout.fillWidth: true - Layout.preferredWidth: 200 - placeholderText: root.showError ? Translation.tr("Insert a valid number!") : Translation.tr("Set FPS limit (e.g. 80)") + Layout.preferredWidth: 180 + placeholderText: root.iconState === "error" ? Translation.tr("Insert a valid number") : Translation.tr("Set FPS limit (e.g. 80)") inputMethodHints: Qt.ImhDigitsOnly focus: true - Keys.onReturnPressed: { + onAccepted: { root.applyLimit(); - event.onAccepted(); + event.accepted = true; } } RippleButton { id: applyButton - implicitWidth: 36 - implicitHeight: 36 + implicitWidth: 25 + implicitHeight: 25 buttonRadius: Appearance.rounding.full onClicked: { root.applyLimit(); @@ -105,21 +89,16 @@ Rectangle { anchors.centerIn: parent horizontalAlignment: Text.AlignHCenter font.pixelSize: Appearance.font.pixelSize.title - text: root.showError ? "close" : (root.showCheckIcon ? "check" : "save") - rotation: (root.showCheckIcon || root.showError) ? 360 : 0 - color: root.showError ? "#ef5350" : (root.showCheckIcon ? Appearance.m3colors.m3primary : Appearance.m3colors.m3onSurface) + text: root.iconState === "error" ? "close" : (root.iconState === "success" ? "check" : "save") + rotation: root.iconState !== "normal" ? 360 : 0 + color: root.iconState === "error" ? "#ef5350" : (root.iconState === "success" ? Appearance.m3colors.m3primary : Appearance.m3colors.m3onSurface) Behavior on rotation { - NumberAnimation { - duration: 200 - easing.type: Easing.OutCubic - } + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } Behavior on color { - ColorAnimation { - duration: 200 - } + animation: Appearance.animation.elementMoveFast.colorAnimation.createObject(this) } } } From 23b471edc2002368e8c37d720cb75418be2a6527 Mon Sep 17 00:00:00 2001 From: reakjra Date: Fri, 7 Nov 2025 16:34:29 +0100 Subject: [PATCH 30/44] Fix non-sensical logic, timers and animations. --- .../ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml b/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml index f971258aa..74173db18 100644 --- a/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml +++ b/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml @@ -73,7 +73,6 @@ Rectangle { onAccepted: { root.applyLimit(); - event.accepted = true; } } From 082f12084d2a79354e3c768105532a9cdbe2c598 Mon Sep 17 00:00:00 2001 From: "Celestial.y" Date: Fri, 7 Nov 2025 23:59:20 +0800 Subject: [PATCH 31/44] Fix #2200 --- dots/.config/hypr/hyprland/execs.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dots/.config/hypr/hyprland/execs.conf b/dots/.config/hypr/hyprland/execs.conf index c273da531..e4f33f6aa 100644 --- a/dots/.config/hypr/hyprland/execs.conf +++ b/dots/.config/hypr/hyprland/execs.conf @@ -24,4 +24,4 @@ exec-once = wl-paste --type image --watch bash -c 'cliphist store && qs -c $qsCo exec-once = hyprctl setcursor Bibata-Modern-Classic 24 # Fix dock pinned apps not launching properly (https://github.com/end-4/dots-hyprland/issues/2200) -# exec-once = sleep 3.5 && hyprctl reload && sleep 0.5 && touch ~/.config/quickshell/ii/shell.qml +exec-once = sleep 3.5 && hyprctl reload && sleep 0.5 && touch ~/.config/quickshell/ii/shell.qml From 2c88a71eedee8e8c0292c721d9a8b240d70b2712 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 7 Nov 2025 18:21:59 +0100 Subject: [PATCH 32/44] overlay: make widgets have proper round corners when pinned --- .../ii/modules/common/Persistent.qml | 2 +- .../modules/overlay/StyledOverlayWidget.qml | 32 ++++++++++++------- .../modules/overlay/crosshair/Crosshair.qml | 6 +++- .../ii/modules/overlay/recorder/Recorder.qml | 1 + .../modules/overlay/resources/Resources.qml | 1 + .../overlay/volumeMixer/VolumeMixer.qml | 1 + 6 files changed, 29 insertions(+), 14 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/common/Persistent.qml b/dots/.config/quickshell/ii/modules/common/Persistent.qml index f2de212c9..43da3467e 100644 --- a/dots/.config/quickshell/ii/modules/common/Persistent.qml +++ b/dots/.config/quickshell/ii/modules/common/Persistent.qml @@ -104,7 +104,7 @@ Singleton { property bool pinned: false property bool clickthrough: false property real x: 80 - property real y: 250 + property real y: 280 } } diff --git a/dots/.config/quickshell/ii/modules/overlay/StyledOverlayWidget.qml b/dots/.config/quickshell/ii/modules/overlay/StyledOverlayWidget.qml index 5e6a0ce3f..42d61c3bd 100644 --- a/dots/.config/quickshell/ii/modules/overlay/StyledOverlayWidget.qml +++ b/dots/.config/quickshell/ii/modules/overlay/StyledOverlayWidget.qml @@ -21,6 +21,7 @@ AbstractOverlayWidget { id: root required property Item contentItem + property bool fancyBorders: true required property var modelData readonly property string identifier: modelData.identifier @@ -29,6 +30,8 @@ AbstractOverlayWidget { property var persistentStateEntry: Persistent.states.overlay[identifier] property real radius: Appearance.rounding.windowRounding property real minWidth: 250 + property real padding: 6 + property real contentRadius: radius - padding draggable: GlobalStates.overlayOpen x: Math.round(persistentStateEntry.x) // Round or it'll be blurry @@ -96,11 +99,15 @@ AbstractOverlayWidget { Rectangle { id: border anchors.fill: parent - color: "transparent" + color: (root.fancyBorders && GlobalStates.overlayOpen) ? Appearance.colors.colLayer1 : "transparent" radius: root.radius border.color: ColorUtils.transparentize(Appearance.colors.colOutlineVariant, GlobalStates.overlayOpen ? 0 : 1) border.width: 1 + Behavior on color { + animation: Appearance.animation.elementMoveFast.colorAnimation.createObject(this) + } + layer.enabled: GlobalStates.overlayOpen layer.effect: OpacityMask { maskSource: Rectangle { @@ -110,25 +117,23 @@ AbstractOverlayWidget { } } - Column { + ColumnLayout { id: contentColumn - z: -1 + z: root.fancyBorders ? 0 : -1 anchors.fill: parent + spacing: 0 // Title bar Rectangle { id: titleBar opacity: GlobalStates.overlayOpen ? 1 : 0 - anchors { - left: parent.left - right: parent.right - } - property real padding: 2 + Layout.fillWidth: true + property real padding: 6 implicitWidth: titleBarRow.implicitWidth + padding * 2 implicitHeight: titleBarRow.implicitHeight + padding * 2 - color: Appearance.m3colors.m3surfaceContainer - border.color: Appearance.colors.colOutlineVariant - border.width: 1 + color: root.fancyBorders ? "transparent" : Appearance.colors.colLayer1 + // border.color: Appearance.colors.colOutlineVariant + // border.width: 1 RowLayout { id: titleBarRow @@ -191,7 +196,10 @@ AbstractOverlayWidget { // Content Item { id: contentContainer - anchors.horizontalCenter: parent.horizontalCenter + Layout.fillWidth: true + Layout.fillHeight: true + Layout.margins: root.fancyBorders ? root.padding : 0 + Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter implicitWidth: root.contentItem.implicitWidth implicitHeight: root.contentItem.implicitHeight children: [root.contentItem] diff --git a/dots/.config/quickshell/ii/modules/overlay/crosshair/Crosshair.qml b/dots/.config/quickshell/ii/modules/overlay/crosshair/Crosshair.qml index abb1cbf26..bb60bd1fd 100644 --- a/dots/.config/quickshell/ii/modules/overlay/crosshair/Crosshair.qml +++ b/dots/.config/quickshell/ii/modules/overlay/crosshair/Crosshair.qml @@ -1,9 +1,13 @@ import QtQuick +import QtQuick.Layouts import Quickshell import qs.modules.common import qs.modules.overlay StyledOverlayWidget { id: root - contentItem: CrosshairContent {} + fancyBorders: false // Crosshair should be see-through + contentItem: CrosshairContent { + anchors.centerIn: parent + } } diff --git a/dots/.config/quickshell/ii/modules/overlay/recorder/Recorder.qml b/dots/.config/quickshell/ii/modules/overlay/recorder/Recorder.qml index 78d747ed6..e853819b4 100644 --- a/dots/.config/quickshell/ii/modules/overlay/recorder/Recorder.qml +++ b/dots/.config/quickshell/ii/modules/overlay/recorder/Recorder.qml @@ -13,6 +13,7 @@ StyledOverlayWidget { contentItem: Rectangle { id: contentItem anchors.centerIn: parent + radius: root.contentRadius color: Appearance.m3colors.m3surfaceContainer property real padding: 8 implicitHeight: contentColumn.implicitHeight + padding * 2 diff --git a/dots/.config/quickshell/ii/modules/overlay/resources/Resources.qml b/dots/.config/quickshell/ii/modules/overlay/resources/Resources.qml index f5f5ff286..1b78b867e 100644 --- a/dots/.config/quickshell/ii/modules/overlay/resources/Resources.qml +++ b/dots/.config/quickshell/ii/modules/overlay/resources/Resources.qml @@ -39,6 +39,7 @@ StyledOverlayWidget { id: contentItem anchors.centerIn: parent color: Appearance.m3colors.m3surfaceContainer + radius: root.contentRadius property real padding: 4 implicitWidth: 350 implicitHeight: 200 diff --git a/dots/.config/quickshell/ii/modules/overlay/volumeMixer/VolumeMixer.qml b/dots/.config/quickshell/ii/modules/overlay/volumeMixer/VolumeMixer.qml index 14aa53006..487f470b5 100644 --- a/dots/.config/quickshell/ii/modules/overlay/volumeMixer/VolumeMixer.qml +++ b/dots/.config/quickshell/ii/modules/overlay/volumeMixer/VolumeMixer.qml @@ -10,6 +10,7 @@ StyledOverlayWidget { contentItem: Rectangle { anchors.centerIn: parent color: Appearance.m3colors.m3surfaceContainer + radius: root.contentRadius property real padding: 16 implicitHeight: 600 implicitWidth: 350 From 843025bc646048ba24f24cd21367c4b3d0171808 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 7 Nov 2025 18:33:32 +0100 Subject: [PATCH 33/44] overlay: make volume mixer has both output and input --- .../ii/modules/common/Persistent.qml | 1 + .../modules/overlay/resources/Resources.qml | 2 +- .../overlay/volumeMixer/VolumeMixer.qml | 46 +++++++++++++++++-- .../volumeMixer/VolumeDialogContent.qml | 2 + 4 files changed, 45 insertions(+), 6 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/common/Persistent.qml b/dots/.config/quickshell/ii/modules/common/Persistent.qml index 43da3467e..82670296e 100644 --- a/dots/.config/quickshell/ii/modules/common/Persistent.qml +++ b/dots/.config/quickshell/ii/modules/common/Persistent.qml @@ -105,6 +105,7 @@ Singleton { property bool clickthrough: false property real x: 80 property real y: 280 + property int tabIndex: 0 } } diff --git a/dots/.config/quickshell/ii/modules/overlay/resources/Resources.qml b/dots/.config/quickshell/ii/modules/overlay/resources/Resources.qml index 1b78b867e..fe32d2a91 100644 --- a/dots/.config/quickshell/ii/modules/overlay/resources/Resources.qml +++ b/dots/.config/quickshell/ii/modules/overlay/resources/Resources.qml @@ -50,7 +50,7 @@ StyledOverlayWidget { fill: parent margins: parent.padding } - spacing: 10 + spacing: 8 SecondaryTabBar { id: tabBar diff --git a/dots/.config/quickshell/ii/modules/overlay/volumeMixer/VolumeMixer.qml b/dots/.config/quickshell/ii/modules/overlay/volumeMixer/VolumeMixer.qml index 487f470b5..68c572579 100644 --- a/dots/.config/quickshell/ii/modules/overlay/volumeMixer/VolumeMixer.qml +++ b/dots/.config/quickshell/ii/modules/overlay/volumeMixer/VolumeMixer.qml @@ -1,7 +1,10 @@ import QtQuick +import QtQuick.Controls import QtQuick.Layouts import Quickshell +import qs.services import qs.modules.common +import qs.modules.common.widgets import qs.modules.overlay import qs.modules.sidebarRight.volumeMixer @@ -15,11 +18,44 @@ StyledOverlayWidget { implicitHeight: 600 implicitWidth: 350 - VolumeDialogContent { - anchors.fill: parent - anchors.margins: parent.padding - isSink: true - } + ColumnLayout { + id: contentColumn + anchors { + fill: parent + margins: parent.padding + } + spacing: 8 + SecondaryTabBar { + id: tabBar + + currentIndex: Persistent.states.overlay.volumeMixer.tabIndex + onCurrentIndexChanged: { + Persistent.states.overlay.volumeMixer.tabIndex = tabBar.currentIndex; + } + + SecondaryTabButton { + buttonIcon: "media_output" + buttonText: Translation.tr("Output") + } + SecondaryTabButton { + buttonIcon: "mic" + buttonText: Translation.tr("Input") + } + } + SwipeView { + id: swipeView + Layout.fillWidth: true + Layout.fillHeight: true + currentIndex: Persistent.states.overlay.volumeMixer.tabIndex + onCurrentIndexChanged: { + Persistent.states.overlay.volumeMixer.tabIndex = swipeView.currentIndex; + } + clip: true + + VolumeDialogContent { isSink: true } + VolumeDialogContent { isSink: false } + } + } } } diff --git a/dots/.config/quickshell/ii/modules/sidebarRight/volumeMixer/VolumeDialogContent.qml b/dots/.config/quickshell/ii/modules/sidebarRight/volumeMixer/VolumeDialogContent.qml index 56f524968..a276128d9 100644 --- a/dots/.config/quickshell/ii/modules/sidebarRight/volumeMixer/VolumeDialogContent.qml +++ b/dots/.config/quickshell/ii/modules/sidebarRight/volumeMixer/VolumeDialogContent.qml @@ -29,6 +29,7 @@ ColumnLayout { Layout.topMargin: -22 Layout.leftMargin: 0 Layout.rightMargin: 0 + color: Appearance.colors.colOutlineVariant } DialogSectionListView { @@ -56,6 +57,7 @@ ColumnLayout { Layout.topMargin: -22 Layout.leftMargin: 0 Layout.rightMargin: 0 + color: Appearance.colors.colOutlineVariant } DialogSectionListView { From cd952729f488afd45ce892188d8dedfdc90ce5ce Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 7 Nov 2025 18:45:42 +0100 Subject: [PATCH 34/44] overlay: adjust titlebar-content gap --- .../quickshell/ii/modules/overlay/StyledOverlayWidget.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/dots/.config/quickshell/ii/modules/overlay/StyledOverlayWidget.qml b/dots/.config/quickshell/ii/modules/overlay/StyledOverlayWidget.qml index 42d61c3bd..e20eb417b 100644 --- a/dots/.config/quickshell/ii/modules/overlay/StyledOverlayWidget.qml +++ b/dots/.config/quickshell/ii/modules/overlay/StyledOverlayWidget.qml @@ -141,6 +141,7 @@ AbstractOverlayWidget { fill: parent margins: titleBar.padding leftMargin: titleBar.padding + 8 + bottomMargin: root.fancyBorders ? 0 : titleBar.padding } spacing: 0 From daa4dd7b0fddaf8edd6420dac1994ff7433bffcd Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 7 Nov 2025 20:33:54 +0100 Subject: [PATCH 35/44] overlay: fps limiter: fix weird container and button size --- .../ii/modules/common/Persistent.qml | 4 +- .../common/widgets/IconToolbarButton.qml | 1 + .../modules/overlay/fpsLimiter/FpsLimiter.qml | 4 +- .../overlay/fpsLimiter/FpsLimiterContent.qml | 71 +++++++------------ 4 files changed, 31 insertions(+), 49 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/common/Persistent.qml b/dots/.config/quickshell/ii/modules/common/Persistent.qml index c4c0b2f1a..3d75d11ef 100644 --- a/dots/.config/quickshell/ii/modules/common/Persistent.qml +++ b/dots/.config/quickshell/ii/modules/common/Persistent.qml @@ -109,8 +109,8 @@ Singleton { property JsonObject fpsLimiter: JsonObject { property bool pinned: false property bool clickthrough: false - property real x: 100 - property real y: 100 + property real x: 1600 + property real y: 630 } } diff --git a/dots/.config/quickshell/ii/modules/common/widgets/IconToolbarButton.qml b/dots/.config/quickshell/ii/modules/common/widgets/IconToolbarButton.qml index df87dcb0e..6e2fd4166 100644 --- a/dots/.config/quickshell/ii/modules/common/widgets/IconToolbarButton.qml +++ b/dots/.config/quickshell/ii/modules/common/widgets/IconToolbarButton.qml @@ -18,5 +18,6 @@ ToolbarButton { iconSize: 22 text: iconBtn.text color: iconBtn.colText + animateChange: true } } diff --git a/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiter.qml b/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiter.qml index 24cac5387..7628d58be 100644 --- a/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiter.qml +++ b/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiter.qml @@ -6,5 +6,7 @@ import qs.modules.overlay StyledOverlayWidget { id: root title: "MangoHud FPS" - contentItem: FpsLimiterContent {} + contentItem: FpsLimiterContent { + radius: root.contentRadius + } } diff --git a/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml b/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml index 74173db18..5857c5a21 100644 --- a/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml +++ b/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml @@ -12,8 +12,9 @@ Rectangle { color: Appearance.m3colors.m3surfaceContainer property real padding: 16 property string iconState: "normal" - implicitWidth: contentColumn.implicitWidth + padding * 2 - implicitHeight: contentColumn.implicitHeight + padding * 2 + anchors.fill: parent + implicitWidth: content.implicitWidth + (padding * 2) + implicitHeight: content.implicitHeight + (padding * 2) Timer { id: iconResetTimer @@ -54,57 +55,35 @@ Rectangle { fpsField.text = ""; } - ColumnLayout { - id: contentColumn + Process { + id: fpsSetter + } + + RowLayout { + id: content anchors.centerIn: parent - spacing: 15 + spacing: 4 - RowLayout { + ToolbarTextField { + id: fpsField Layout.fillWidth: true - spacing: 10 + Layout.preferredWidth: 200 + placeholderText: root.iconState === "error" ? Translation.tr("Insert a valid number") : Translation.tr("Set FPS limit (e.g. 80)") + inputMethodHints: Qt.ImhDigitsOnly + focus: true - ToolbarTextField { - id: fpsField - Layout.fillWidth: true - Layout.preferredWidth: 180 - placeholderText: root.iconState === "error" ? Translation.tr("Insert a valid number") : Translation.tr("Set FPS limit (e.g. 80)") - inputMethodHints: Qt.ImhDigitsOnly - focus: true - - onAccepted: { - root.applyLimit(); - } - } - - RippleButton { - id: applyButton - implicitWidth: 25 - implicitHeight: 25 - buttonRadius: Appearance.rounding.full - onClicked: { - root.applyLimit(); - } - contentItem: MaterialSymbol { - anchors.centerIn: parent - horizontalAlignment: Text.AlignHCenter - font.pixelSize: Appearance.font.pixelSize.title - text: root.iconState === "error" ? "close" : (root.iconState === "success" ? "check" : "save") - rotation: root.iconState !== "normal" ? 360 : 0 - color: root.iconState === "error" ? "#ef5350" : (root.iconState === "success" ? Appearance.m3colors.m3primary : Appearance.m3colors.m3onSurface) - - Behavior on rotation { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - - Behavior on color { - animation: Appearance.animation.elementMoveFast.colorAnimation.createObject(this) - } - } + onAccepted: { + root.applyLimit(); } } - Process { - id: fpsSetter + IconToolbarButton { + id: applyButton + text: root.iconState === "error" ? "close" : (root.iconState === "success" ? "check" : "save") + enabled: root.iconState === "normal" && fpsField.text.length > 0 + onClicked: { + root.applyLimit(); + } } } } From a91fe7db309920e927297b3d6c958cd1a79ca969 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 7 Nov 2025 20:49:48 +0100 Subject: [PATCH 36/44] overlay: fps limiter: use enums for states --- .../overlay/fpsLimiter/FpsLimiterContent.qml | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml b/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml index 5857c5a21..a67bf40c1 100644 --- a/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml +++ b/dots/.config/quickshell/ii/modules/overlay/fpsLimiter/FpsLimiterContent.qml @@ -9,10 +9,13 @@ import qs.modules.common.widgets Rectangle { id: root - color: Appearance.m3colors.m3surfaceContainer - property real padding: 16 - property string iconState: "normal" + + enum State { Normal, Success, Error } + anchors.fill: parent + property real padding: 16 + property var currentState: FpsLimiterContent.State.Normal + color: Appearance.m3colors.m3surfaceContainer implicitWidth: content.implicitWidth + (padding * 2) implicitHeight: content.implicitHeight + (padding * 2) @@ -20,14 +23,14 @@ Rectangle { id: iconResetTimer interval: 1000 onTriggered: { - root.iconState = "normal"; + root.currentState = FpsLimiterContent.State.Normal; } } function applyLimit() { var fpsValue = parseInt(fpsField.text); if (isNaN(fpsValue) || fpsValue < 0) { - root.iconState = "error"; + root.currentState = FpsLimiterContent.State.Error; iconResetTimer.restart(); fpsField.text = ""; return; @@ -48,7 +51,7 @@ Rectangle { fpsSetter.command = ["bash", "-c", cmd]; fpsSetter.startDetached(); - root.iconState = "success"; + root.currentState = FpsLimiterContent.State.Success; iconResetTimer.restart(); // Clear the field after applying @@ -68,7 +71,7 @@ Rectangle { id: fpsField Layout.fillWidth: true Layout.preferredWidth: 200 - placeholderText: root.iconState === "error" ? Translation.tr("Insert a valid number") : Translation.tr("Set FPS limit (e.g. 80)") + placeholderText: root.currentState === FpsLimiterContent.State.Error ? Translation.tr("Enter a valid number") : Translation.tr("Set FPS limit") inputMethodHints: Qt.ImhDigitsOnly focus: true @@ -79,8 +82,13 @@ Rectangle { IconToolbarButton { id: applyButton - text: root.iconState === "error" ? "close" : (root.iconState === "success" ? "check" : "save") - enabled: root.iconState === "normal" && fpsField.text.length > 0 + text: switch (root.currentState) { + case FpsLimiterContent.State.Error: return "close"; + case FpsLimiterContent.State.Success: return "check"; + case FpsLimiterContent.State.Normal: + default: return "save"; + } + enabled: root.currentState === FpsLimiterContent.State.Normal && fpsField.text.length > 0 onClicked: { root.applyLimit(); } From 917fae6d4f92d71d004a3970cbb7d45ea42071b7 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 7 Nov 2025 20:54:23 +0100 Subject: [PATCH 37/44] overlay: fps limiter: adjust default position --- dots/.config/quickshell/ii/modules/common/Persistent.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dots/.config/quickshell/ii/modules/common/Persistent.qml b/dots/.config/quickshell/ii/modules/common/Persistent.qml index 3d75d11ef..33ea644dd 100644 --- a/dots/.config/quickshell/ii/modules/common/Persistent.qml +++ b/dots/.config/quickshell/ii/modules/common/Persistent.qml @@ -109,7 +109,7 @@ Singleton { property JsonObject fpsLimiter: JsonObject { property bool pinned: false property bool clickthrough: false - property real x: 1600 + property real x: 1576 property real y: 630 } } From 20b3d2498ed819d69f4561b0fc10ffb82d358171 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 7 Nov 2025 21:05:59 +0100 Subject: [PATCH 38/44] overlay: add delay to focus grab --- .../quickshell/ii/modules/overlay/Overlay.qml | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/overlay/Overlay.qml b/dots/.config/quickshell/ii/modules/overlay/Overlay.qml index 2fd33fcd7..5401e2f28 100644 --- a/dots/.config/quickshell/ii/modules/overlay/Overlay.qml +++ b/dots/.config/quickshell/ii/modules/overlay/Overlay.qml @@ -46,10 +46,24 @@ Scope { HyprlandFocusGrab { id: grab windows: [overlayWindow] - active: GlobalStates.overlayOpen + active: false onCleared: () => { - if (!active) - GlobalStates.overlayOpen = false; + if (!active) GlobalStates.overlayOpen = false; + } + } + + Connections { + target: GlobalStates + function onOverlayOpenChanged() { + delayedGrabTimer.start(); + } + } + + Timer { + id: delayedGrabTimer + interval: Appearance.animation.elementMoveFast.duration + onTriggered: { + grab.active = GlobalStates.overlayOpen; } } From 3fe8377309c41f0b9828d1edf8e4b74303cfe06c Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 7 Nov 2025 21:06:31 +0100 Subject: [PATCH 39/44] make timer restart instead of start --- dots/.config/quickshell/ii/modules/overlay/Overlay.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dots/.config/quickshell/ii/modules/overlay/Overlay.qml b/dots/.config/quickshell/ii/modules/overlay/Overlay.qml index 5401e2f28..71ba510c6 100644 --- a/dots/.config/quickshell/ii/modules/overlay/Overlay.qml +++ b/dots/.config/quickshell/ii/modules/overlay/Overlay.qml @@ -55,7 +55,7 @@ Scope { Connections { target: GlobalStates function onOverlayOpenChanged() { - delayedGrabTimer.start(); + delayedGrabTimer.restart(); } } From a831d393c1e00bac8256d8c11bde60574859a577 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 7 Nov 2025 21:08:30 +0100 Subject: [PATCH 40/44] fix some undefined warnings --- .../modules/sidebarRight/volumeMixer/VolumeMixerEntry.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/sidebarRight/volumeMixer/VolumeMixerEntry.qml b/dots/.config/quickshell/ii/modules/sidebarRight/volumeMixer/VolumeMixerEntry.qml index 503f83af0..a00335fb0 100644 --- a/dots/.config/quickshell/ii/modules/sidebarRight/volumeMixer/VolumeMixerEntry.qml +++ b/dots/.config/quickshell/ii/modules/sidebarRight/volumeMixer/VolumeMixerEntry.qml @@ -28,10 +28,10 @@ Item { sourceSize.height: size source: { let icon; - icon = AppSearch.guessIcon(root.node.properties["application.icon-name"]); + icon = AppSearch.guessIcon(root.node?.properties["application.icon-name"] ?? ""); if (AppSearch.iconExists(icon)) return Quickshell.iconPath(icon, "image-missing"); - icon = AppSearch.guessIcon(root.node.properties["node.name"]); + icon = AppSearch.guessIcon(root.node?.properties["node.name"] ?? ""); return Quickshell.iconPath(icon, "image-missing"); } } @@ -47,7 +47,7 @@ Item { elide: Text.ElideRight text: { // application.name -> description -> name - const app = root.node.properties["application.name"] ?? (root.node.description != "" ? root.node.description : root.node.name); + const app = root.node?.properties["application.name"] ?? (root.node.description != "" ? root.node.description : root.node.name); const media = root.node.properties["media.name"]; return media != undefined ? `${app} • ${media}` : app; } @@ -55,7 +55,7 @@ Item { StyledSlider { id: slider - value: root.node.audio.volume + value: root.node?.audio.volume ?? 0 onMoved: root.node.audio.volume = value configuration: StyledSlider.Configuration.S } From 87181585aa92a5b31794b192368a2134cfa29487 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 7 Nov 2025 21:09:39 +0100 Subject: [PATCH 41/44] overlay: add config option for clickthrough widget opacity --- dots/.config/quickshell/ii/modules/common/Config.qml | 1 + .../quickshell/ii/modules/overlay/StyledOverlayWidget.qml | 1 + 2 files changed, 2 insertions(+) diff --git a/dots/.config/quickshell/ii/modules/common/Config.qml b/dots/.config/quickshell/ii/modules/common/Config.qml index d064d2533..363c4c906 100644 --- a/dots/.config/quickshell/ii/modules/common/Config.qml +++ b/dots/.config/quickshell/ii/modules/common/Config.qml @@ -380,6 +380,7 @@ Singleton { property JsonObject overlay: JsonObject { property bool openingZoomAnimation: true property bool darkenScreen: true + property real clickthroughOpacity: 0.7 } property JsonObject overview: JsonObject { diff --git a/dots/.config/quickshell/ii/modules/overlay/StyledOverlayWidget.qml b/dots/.config/quickshell/ii/modules/overlay/StyledOverlayWidget.qml index e20eb417b..013885cf4 100644 --- a/dots/.config/quickshell/ii/modules/overlay/StyledOverlayWidget.qml +++ b/dots/.config/quickshell/ii/modules/overlay/StyledOverlayWidget.qml @@ -44,6 +44,7 @@ AbstractOverlayWidget { maximumX: root.parent.width - root.width maximumY: root.parent.height - root.height } + opacity: (GlobalStates.overlayOpen || !clickthrough) ? 1.0 : Config.options.overlay.clickthroughOpacity // Guarded states & registration funcs property bool open: Persistent.states.overlay.open From 1cc04e118ffb852c81a2f9bac5889c89540ab68a Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 7 Nov 2025 21:10:21 +0100 Subject: [PATCH 42/44] overlay: hide some unnecessary buttons --- .../quickshell/ii/modules/overlay/StyledOverlayWidget.qml | 6 +++++- .../quickshell/ii/modules/overlay/crosshair/Crosshair.qml | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dots/.config/quickshell/ii/modules/overlay/StyledOverlayWidget.qml b/dots/.config/quickshell/ii/modules/overlay/StyledOverlayWidget.qml index 013885cf4..1f60cf9a4 100644 --- a/dots/.config/quickshell/ii/modules/overlay/StyledOverlayWidget.qml +++ b/dots/.config/quickshell/ii/modules/overlay/StyledOverlayWidget.qml @@ -22,6 +22,8 @@ AbstractOverlayWidget { required property Item contentItem property bool fancyBorders: true + property bool showCenterButton: false + property bool showClickabilityButton: true required property var modelData readonly property string identifier: modelData.identifier @@ -144,7 +146,7 @@ AbstractOverlayWidget { leftMargin: titleBar.padding + 8 bottomMargin: root.fancyBorders ? 0 : titleBar.padding } - spacing: 0 + spacing: 2 MaterialSymbol { text: root.materialSymbol @@ -160,6 +162,7 @@ AbstractOverlayWidget { } TitlebarButton { + visible: root.showCenterButton materialSymbol: "recenter" onClicked: root.center() StyledToolTip { @@ -168,6 +171,7 @@ AbstractOverlayWidget { } TitlebarButton { + visible: (root.pinned && root.showClickabilityButton) materialSymbol: "mouse" toggled: !root.clickthrough onClicked: root.toggleClickthrough() diff --git a/dots/.config/quickshell/ii/modules/overlay/crosshair/Crosshair.qml b/dots/.config/quickshell/ii/modules/overlay/crosshair/Crosshair.qml index bb60bd1fd..4a92aa43e 100644 --- a/dots/.config/quickshell/ii/modules/overlay/crosshair/Crosshair.qml +++ b/dots/.config/quickshell/ii/modules/overlay/crosshair/Crosshair.qml @@ -7,6 +7,11 @@ import qs.modules.overlay StyledOverlayWidget { id: root fancyBorders: false // Crosshair should be see-through + showCenterButton: true + opacity: 1 // The crosshair itself already has transparency if configured + showClickabilityButton: false + clickthrough: true + contentItem: CrosshairContent { anchors.centerIn: parent } From 26f2a9f3fdc4f0c82afe98bb537ec23323ea858b Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 7 Nov 2025 21:11:11 +0100 Subject: [PATCH 43/44] fix more null warnings --- .../quickshell/ii/modules/overlay/StyledOverlayWidget.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/overlay/StyledOverlayWidget.qml b/dots/.config/quickshell/ii/modules/overlay/StyledOverlayWidget.qml index 1f60cf9a4..a8b6fdbaf 100644 --- a/dots/.config/quickshell/ii/modules/overlay/StyledOverlayWidget.qml +++ b/dots/.config/quickshell/ii/modules/overlay/StyledOverlayWidget.qml @@ -43,8 +43,8 @@ AbstractOverlayWidget { drag { minimumX: 0 minimumY: 0 - maximumX: root.parent.width - root.width - maximumY: root.parent.height - root.height + maximumX: root.parent?.width - root.width + maximumY: root.parent?.height - root.height } opacity: (GlobalStates.overlayOpen || !clickthrough) ? 1.0 : Config.options.overlay.clickthroughOpacity From 1d07260fd0e5bdc5e76f5953d820211b5ea44232 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 7 Nov 2025 21:24:37 +0100 Subject: [PATCH 44/44] add kb focus border for group buttons --- .../quickshell/ii/modules/common/widgets/GroupButton.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dots/.config/quickshell/ii/modules/common/widgets/GroupButton.qml b/dots/.config/quickshell/ii/modules/common/widgets/GroupButton.qml index de9ce5603..080439613 100644 --- a/dots/.config/quickshell/ii/modules/common/widgets/GroupButton.qml +++ b/dots/.config/quickshell/ii/modules/common/widgets/GroupButton.qml @@ -117,7 +117,7 @@ Button { }; } - + property bool tabbedTo: root.focus && (focusReason === Qt.TabFocusReason || focusReason === Qt.BacktabFocusReason) background: Rectangle { id: buttonBackground topLeftRadius: root.leftRadius @@ -130,6 +130,9 @@ Button { Behavior on color { animation: Appearance.animation.elementMoveFast.colorAnimation.createObject(this) } + + border.width: root.tabbedTo ? 2 : 0 + border.color: Appearance.colors.colSecondary } contentItem: StyledText {