From c917d7dccba3be16beadb6691b3af72e6f37dc1e Mon Sep 17 00:00:00 2001 From: MichaelThomas0721 Date: Mon, 25 Aug 2025 13:47:54 -0400 Subject: [PATCH] Added setting for workspace names --- Commons/Settings.qml | 1 + Modules/Bar/Widgets/Workspace.qml | 15 +++++++++++++++ Modules/SettingsPanel/Tabs/BarTab.qml | 9 +++++++++ 3 files changed, 25 insertions(+) diff --git a/Commons/Settings.qml b/Commons/Settings.qml index 2e63d53..810f093 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -122,6 +122,7 @@ Singleton { property bool showActiveWindowIcon: true property bool alwaysShowBatteryPercentage: false property real backgroundOpacity: 1.0 + property bool showWorkspaceNames: false property list monitors: [] // Widget configuration for modular bar system diff --git a/Modules/Bar/Widgets/Workspace.qml b/Modules/Bar/Widgets/Workspace.qml index 0871ce7..6979542 100644 --- a/Modules/Bar/Widgets/Workspace.qml +++ b/Modules/Bar/Widgets/Workspace.qml @@ -161,6 +161,21 @@ Item { Rectangle { id: workspacePill anchors.fill: parent + + Loader { + anchors.centerIn: parent + active: Settings.data.bar.showWorkspaceNames + sourceComponent: Component { + Text { + text: model.name.substring(0,2) + font.pointSize: Style.fontSizeXS * scaling + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + wrapMode: Text.Wrap + } + } + } + radius: { if (model.isFocused) return Math.round(12 * scaling) diff --git a/Modules/SettingsPanel/Tabs/BarTab.qml b/Modules/SettingsPanel/Tabs/BarTab.qml index efee796..5309993 100644 --- a/Modules/SettingsPanel/Tabs/BarTab.qml +++ b/Modules/SettingsPanel/Tabs/BarTab.qml @@ -127,6 +127,15 @@ ColumnLayout { Settings.data.bar.alwaysShowBatteryPercentage = checked } } + + NToggle { + label: "Show Workspace Names" + description: "Show the workspace names on the workspace indicators" + checked: Settings.data.bar.showWorkspaceNames + onToggled: checked => { + Settings.data.bar.showWorkspaceNames = checked + } + } NDivider { Layout.fillWidth: true