Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background colors from bitbar plugins do not work #792

Open
ahmetb opened this issue Nov 17, 2021 · 8 comments · May be fixed by #818
Open

Background colors from bitbar plugins do not work #792

ahmetb opened this issue Nov 17, 2021 · 8 comments · May be fixed by #818

Comments

@ahmetb
Copy link

ahmetb commented Nov 17, 2021

v2.1.7-beta

Repro: https://xbarapp.com/docs/plugins/Dev/Tutorial/ansi.sh.html

renders as
image

but it should render as
image

another repro is at https://github.com/ahmetb/dotfiles/blob/master/bitbar-plugins/yahoo_stock_ticker.1m.py renders as

image

whereas bitbar renders this as
image

@leaanthony
Copy link
Collaborator

Hmmm...there must be something up with the ANSI parser. I'll take a look.

@ahmetb
Copy link
Author

ahmetb commented Feb 24, 2022

Any love for this issue? 😇

@leaanthony
Copy link
Collaborator

leaanthony commented Feb 24, 2022

Thanks for the ping! I'll have a quick peek tonight

@ahmetb
Copy link
Author

ahmetb commented Feb 24, 2022

If you need a repro: https://github.com/ahmetb/dotfiles/blob/master/bitbar-plugins/yahoo_stock_ticker.1m.py

@leaanthony
Copy link
Collaborator

Thanks. This'll be the weekend now. It looks like a parse error so I'll need to create a test case out of this for https://github.com/leaanthony/go-ansi-parser

@leaanthony
Copy link
Collaborator

leaanthony commented Feb 26, 2022

@ahmetb - after more looking at this, it seems bitbar didn't render it correctly anyway. [40m should be black, not grey. I'm also reading that [1m (bold) should be interpreted as "high intensity" so it would make the colours brighter. Running this script in a terminal seems to set it to intense colours by default, which is weird.

I've fixed a small parse error which cleared it all up:
image

I believe, based on what I'm reading in the standards, this is the correct output for those codes. If you disagree and have more insights, please let me know. Cheers.

@leaanthony
Copy link
Collaborator

Should also mention that the bitbar rendering of the yahoo finance plugin in this thread is also a bit off. The screenshot on the plugin page looks like there are no background colours:
https://xbarapp.com/docs/plugins/Finance/yahoo_stock_ticker.10m.py.html

@ahmetb
Copy link
Author

ahmetb commented Feb 26, 2022

I have customized it. I recommend trying with the link I provided.

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

Successfully merging a pull request may close this issue.

2 participants