yabar
yabar copied to clipboard
How to: dynamic colors
Can someone show me how to set underline, background or foreground colors dynamically for different battery states? Is that possible? Thanks!
That depends. Are you talking about the entire bar or specific blocks? Within a block, you can enable Pango markup using pango-markup: true;
in the block definition. Then in your script for battery states, you can use Pango markup, outlined here.
So, for example, if you wanted to change the background of a section of text, you would output <span background=\"#hexcode\">text</span>
in the script.
Pango also supports underline, italicizing, bold, font changing (although I've never tried this one in Yabar, it might mess something up), font size changing, etc, etc. Hope that's what you were looking for!