bar/workspaces: special ws icon config (#785)
* workspaces: icons config * add README json example
This commit is contained in:
parent
dde0f85e78
commit
e399a9d7a3
3 changed files with 15 additions and 1 deletions
|
|
@ -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": {
|
||||
|
|
|
|||
|
|
@ -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<var> specialWorkspaceIcons: []
|
||||
}
|
||||
|
||||
component Tray: JsonObject {
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue