yabar icon indicating copy to clipboard operation
yabar copied to clipboard

How to: dynamic colors

Open agzam opened this issue 6 years ago • 1 comments

Can someone show me how to set underline, background or foreground colors dynamically for different battery states? Is that possible? Thanks!

agzam avatar May 18 '18 08:05 agzam

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!

derekthesnake avatar Aug 07 '18 11:08 derekthesnake