From 28c9cacf68c8b47216b1f6cec3cd142d992bc2be Mon Sep 17 00:00:00 2001 From: kirisaki-vk Date: Thu, 28 Aug 2025 09:30:54 +0300 Subject: [PATCH 1/4] bar: add workspace number mapping --- .config/quickshell/ii/modules/bar/Workspaces.qml | 2 +- .config/quickshell/ii/modules/common/Config.qml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/bar/Workspaces.qml b/.config/quickshell/ii/modules/bar/Workspaces.qml index ace453ba0..d3ded59b8 100644 --- a/.config/quickshell/ii/modules/bar/Workspaces.qml +++ b/.config/quickshell/ii/modules/bar/Workspaces.qml @@ -217,7 +217,7 @@ Item { horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter font.pixelSize: Appearance.font.pixelSize.small - ((text.length - 1) * (text !== "10") * 2) - text: `${button.workspaceValue}` + text: `${Config.options?.bar.workspaces.numberMapping[button.workspaceValue - 1] || button.workspaceValue}` elide: Text.ElideRight color: (monitor?.activeWorkspace?.id == button.workspaceValue) ? Appearance.m3colors.m3onPrimary : diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index 06d593bd2..c8a8bc78a 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -174,6 +174,7 @@ Singleton { property bool showAppIcons: true property bool alwaysShowNumbers: false property int showNumberDelay: 300 // milliseconds + property list numberMapping: [] } property JsonObject weather: JsonObject { property bool enable: false From 45894c32558ce4d1bbe7cde227f07b6759563e76 Mon Sep 17 00:00:00 2001 From: kirisaki-vk Date: Fri, 29 Aug 2025 09:51:08 +0300 Subject: [PATCH 2/4] chore: use var instead of list --- .config/quickshell/ii/modules/common/Config.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index c8a8bc78a..8ce2d0c06 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -174,7 +174,10 @@ Singleton { property bool showAppIcons: true property bool alwaysShowNumbers: false property int showNumberDelay: 300 // milliseconds - property list numberMapping: [] + property var numberMapping: { + "1": "1", + "2": "2" + } } property JsonObject weather: JsonObject { property bool enable: false From e5db36e21ea7b19657bd2f787550a07f72789f57 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 30 Aug 2025 14:59:11 +0200 Subject: [PATCH 3/4] workspace number mapping: rename config var, use list --- .config/quickshell/ii/modules/bar/Workspaces.qml | 2 +- .config/quickshell/ii/modules/common/Config.qml | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.config/quickshell/ii/modules/bar/Workspaces.qml b/.config/quickshell/ii/modules/bar/Workspaces.qml index d3ded59b8..74e0524d9 100644 --- a/.config/quickshell/ii/modules/bar/Workspaces.qml +++ b/.config/quickshell/ii/modules/bar/Workspaces.qml @@ -217,7 +217,7 @@ Item { horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter font.pixelSize: Appearance.font.pixelSize.small - ((text.length - 1) * (text !== "10") * 2) - text: `${Config.options?.bar.workspaces.numberMapping[button.workspaceValue - 1] || button.workspaceValue}` + text: Config.options?.bar.workspaces.numberMap[button.workspaceValue - 1] || button.workspaceValue elide: Text.ElideRight color: (monitor?.activeWorkspace?.id == button.workspaceValue) ? Appearance.m3colors.m3onPrimary : diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index 8ce2d0c06..05627416a 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -174,10 +174,7 @@ Singleton { property bool showAppIcons: true property bool alwaysShowNumbers: false property int showNumberDelay: 300 // milliseconds - property var numberMapping: { - "1": "1", - "2": "2" - } + property list numberMap: ["1", "2"] // Characters to show instead of numbers on workspace indicator } property JsonObject weather: JsonObject { property bool enable: false From 6a1acc819b5a2f3d24618b86f686b8c640206e8e Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 30 Aug 2025 15:01:59 +0200 Subject: [PATCH 4/4] workspace numbers: allow using nerd font --- .config/quickshell/ii/modules/bar/Workspaces.qml | 5 ++++- .config/quickshell/ii/modules/common/Config.qml | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/bar/Workspaces.qml b/.config/quickshell/ii/modules/bar/Workspaces.qml index 74e0524d9..a426ce71b 100644 --- a/.config/quickshell/ii/modules/bar/Workspaces.qml +++ b/.config/quickshell/ii/modules/bar/Workspaces.qml @@ -216,7 +216,10 @@ Item { anchors.centerIn: parent horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter - font.pixelSize: Appearance.font.pixelSize.small - ((text.length - 1) * (text !== "10") * 2) + font { + pixelSize: Appearance.font.pixelSize.small - ((text.length - 1) * (text !== "10") * 2) + family: Config.options?.bar.workspaces.useNerdFont ? Appearance.font.family.iconNerd : Appearance.font.family.main + } text: Config.options?.bar.workspaces.numberMap[button.workspaceValue - 1] || button.workspaceValue elide: Text.ElideRight color: (monitor?.activeWorkspace?.id == button.workspaceValue) ? diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index 05627416a..18172a02f 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -175,6 +175,7 @@ Singleton { property bool alwaysShowNumbers: false property int showNumberDelay: 300 // milliseconds property list numberMap: ["1", "2"] // Characters to show instead of numbers on workspace indicator + property bool useNerdFont: false } property JsonObject weather: JsonObject { property bool enable: false