Suppose I want to colorize my workspace names. But doing something like this doesn’t work:
set $ws1 "<span foreground=#AABBCC>sometext</span>"
i3bar won’t even render the text.
Workspace names are parsed as pango markup, according to i3’s documentation. So I must be doing something wrong. There are examples in the documentation that uses pango markups, but only through bindsym statements. Is there a way for us to apply the markup directly onto the workspace names?
As far as I know this set $ws1 is just giving it its name (label), not the graphical look.
To switch to the workspace you would have to press $mod + "<span foreground=#AABBCC>sometext</span>" key which is not possible in the first place (such key does not exists).
But according to an example in config set $ws2 2:.
Try set $ws1 1:<span\ foreground=#AABBCC>sometext</span> - I am not sure if the space has to be escaped with \ or not. Try it yourself. I use polybar so I do not have the i3bar active.
The colors are normally set in `bar {}` section.
You can play with the colors in this online generator - [https://thomashunter.name/i3-configurator/](https://thomashunter.name/i3-configurator/)
A example:
```
bar {
colors {
background #000000
statusline #FFFFFF
separator #666666
#CHANGE THIS LAST COLUMN FOR TEXT COLOR
focused_workspace #4C7899 #285577 #FFFFFF
active_workspace #333333 #222222 #FFFFFF
inactive_workspace #2F343A #222222 #868686
urgent_workspace #2F343A #900000 #FFFFFF
binding_mode #2F343A #900000 #FFFFFF
}
}
```
Just put the quotation mark to a correct postion around the color.
This should print red text.
set $ws4 4:<span color="#FF0000">aaa</span>
Oddly enough polybar removed 4: from the text above but i3bar does not.