Skip to content
This repository has been archived by the owner on Jan 14, 2025. It is now read-only.

How to: dynamic colors #188

Open
agzam opened this issue May 18, 2018 · 1 comment
Open

How to: dynamic colors #188

agzam opened this issue May 18, 2018 · 1 comment

Comments

@agzam
Copy link

agzam commented May 18, 2018

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

@agzam agzam changed the title How to: dynamic underline colors How to: dynamic colors Jun 11, 2018
@derekthesnake
Copy link

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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants