From e399a9d7a34a13d2a783fc4e591cadabdd20423e Mon Sep 17 00:00:00 2001 From: Robin Seger Date: Mon, 13 Oct 2025 13:52:14 +0200 Subject: bar/workspaces: special ws icon config (#785) * workspaces: icons config * add README json example --- README.md | 8 +++++++- config/BarConfig.qml | 1 + utils/Icons.qml | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d8be30a..64873e9 100644 --- a/README.md +++ b/README.md @@ -386,7 +386,13 @@ default, you must create it manually. "occupiedLabel": "󰮯", "perMonitorWorkspaces": true, "showWindows": true, - "shown": 5 + "shown": 5, + "specialWorkspaceIcons": [ + { + "name": "steam", + "icon": "sports_esports" + } + ] } }, "border": { diff --git a/config/BarConfig.qml b/config/BarConfig.qml index 0067bce..86c2a40 100644 --- a/config/BarConfig.qml +++ b/config/BarConfig.qml @@ -68,6 +68,7 @@ JsonObject { property string occupiedLabel: "󰮯" property string activeLabel: "󰮯" property string capitalisation: "preserve" // upper, lower, or preserve - relevant only if label is empty + property list specialWorkspaceIcons: [] } component Tray: JsonObject { diff --git a/utils/Icons.qml b/utils/Icons.qml index 45c1537..e946c4f 100644 --- a/utils/Icons.qml +++ b/utils/Icons.qml @@ -194,6 +194,13 @@ Singleton { function getSpecialWsIcon(name: string): string { name = name.toLowerCase().slice("special:".length); + + for (const iconConfig of Config.bar.workspaces.specialWorkspaceIcons) { + if (iconConfig.name === name) { + return iconConfig.icon; + } + } + if (name === "special") return "star"; if (name === "communication") -- cgit v1.2.3-freya