From 65c54e12c29502a75dc722d788fba626cc926f65 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Wed, 30 Apr 2025 12:50:12 +1000 Subject: bar: custom workspace labels --- config/BarConfig.qml | 2 ++ modules/bar/components/workspaces/Workspace.qml | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config/BarConfig.qml b/config/BarConfig.qml index cdaaf7e..fe0dab3 100644 --- a/config/BarConfig.qml +++ b/config/BarConfig.qml @@ -26,6 +26,8 @@ Singleton { readonly property int shown: 10 readonly property string style: "" readonly property bool occupiedBg: true + readonly property string label: " " + readonly property string activeLabel: "󰮯 " } component Tray: QtObject { diff --git a/modules/bar/components/workspaces/Workspace.qml b/modules/bar/components/workspaces/Workspace.qml index 5af0e62..a6e2b43 100644 --- a/modules/bar/components/workspaces/Workspace.qml +++ b/modules/bar/components/workspaces/Workspace.qml @@ -11,10 +11,13 @@ StyledText { readonly property bool isWorkspace: true // Flag for finding workspace children - property int ws: groupOffset + index + 1 + readonly property int ws: groupOffset + index + 1 + readonly property string label: BarConfig.workspaces.label || ws + readonly property string activeLabel: BarConfig.workspaces.activeLabel || label animate: true - text: ws + animateProp: "scale" + text: (Hyprland.activeWorkspace?.id ?? 1) === ws ? activeLabel : label color: BarConfig.workspaces.occupiedBg || occupied[ws] ? Appearance.colours.text : Appearance.colours.subtext0 horizontalAlignment: StyledText.AlignHCenter -- cgit v1.2.3-freya