matryer / xbar

Put the output from any script or program into your macOS Menu Bar (the BitBar reboot)
https://xbarapp.com
MIT License
17.45k stars 641 forks source link

Does it support background color using ANSI? #893

Open provCristianMaluenda opened 1 year ago

provCristianMaluenda commented 1 year ago

Hi, I am trying to set the background color using ANSI. The console looks fine, but xbar changes the color to the text and not the background. I am using Python3 and the code is like:

HEALTHY='\x1b[42m'
UNHEALTHY='\x1b[41m'
NC='\x1b[0m'

print(f'{HEALTHY}dev{NC}')

Console: image xbar shows the text blue instead of the background: image

I saw the example https://github.com/matryer/xbar/pull/703 but I can not find an example of a text with a colored background.

Thanks