matryer / matryer/xbar

Does it support background color using ANSI?

Open
#893 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
18.1k
Forks
656
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the provided Python ANSI snippet in xbar and compare its rendering with the behavior described in pull request #703. Trace how xbar interprets ANSI color sequences; done means a background sequence renders as the menu bar item's background rather than changing the text color.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, python
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.