Waybar
Waybar copied to clipboard
Add justify config option for Labels
This is PR adds the option to specify a "justify" field for aligning text modules. It should be either "left", "right" or "center".
This is especially useful for centering the text in labels on vertical bars. In situations like this:
"format": "{icon}\n{value}%",
This kind of fix was already mentioned in #366, however it was never implemented, so here's my take on it.
An example config for this:
"memory": {
"format": "\n{}%", // That's a character for a RAM module in the font I'm using.
"justify": "center",
},
Nice, can you add this to the man and github wiki?
This would need to be added to basically all module documentations, right?
Would love to see this implemented, I myself have been wanting this!
Sorry for the delay, yep should be added to all modules that inherit label class :)
So all we need is documentation for this to get merged?
Alright, I've added documentation for justify whereever I was able to find documentation for align. Which should be everything that inherits the label class. I also slightly changed the documentation for align, in order to clarify the difference between these two options.
Let me know if there's anything else!
LGTM, thx!