diff options
| author | sweenu <contact@sweenu.xyz> | 2025-09-01 13:47:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-01 21:47:10 +1000 |
| commit | 1d5360d3f33f5148387e89970a9cc94f63b65e40 (patch) | |
| tree | 73823061596fd25bd5f60a883a8b2477a7918114 /modules/bar/components/workspaces/Workspace.qml | |
| parent | bar/workspaces: different `showWindows` option for special ws (#544) (diff) | |
| download | caelestia-shell-1d5360d3f33f5148387e89970a9cc94f63b65e40.tar.gz caelestia-shell-1d5360d3f33f5148387e89970a9cc94f63b65e40.tar.bz2 caelestia-shell-1d5360d3f33f5148387e89970a9cc94f63b65e40.zip | |
bar/workspaces: add option for ws name capitalisation (#543)
Diffstat (limited to 'modules/bar/components/workspaces/Workspace.qml')
| -rw-r--r-- | modules/bar/components/workspaces/Workspace.qml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/bar/components/workspaces/Workspace.qml b/modules/bar/components/workspaces/Workspace.qml index b4e6b40..d9d103d 100644 --- a/modules/bar/components/workspaces/Workspace.qml +++ b/modules/bar/components/workspaces/Workspace.qml @@ -36,7 +36,14 @@ ColumnLayout { animate: true text: { const ws = Hypr.workspaces.values.find(w => w.id === root.ws); - const label = Config.bar.workspaces.label || (!ws || ws.name == root.ws ? root.ws : ws.name[0].toUpperCase()); + const wsName = !ws || ws.name == root.ws ? root.ws : ws.name[0]; + let displayName = wsName.toString(); + if (Config.bar.workspaces.capitalisation.toLowerCase() === "upper") { + displayName = displayName.toUpperCase(); + } else if (Config.bar.workspaces.capitalisation.toLowerCase() === "lower") { + displayName = displayName.toLowerCase(); + } + const label = Config.bar.workspaces.label || displayName; const occupiedLabel = Config.bar.workspaces.occupiedLabel || label; const activeLabel = Config.bar.workspaces.activeLabel || (root.isOccupied ? occupiedLabel : label); return root.activeWsId === root.ws ? activeLabel : root.isOccupied ? occupiedLabel : label; |