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

ANSI issue - default foreground color (\033[39m) #93

Closed
rockyzhang24 opened this issue Dec 17, 2020 · 4 comments
Closed

ANSI issue - default foreground color (\033[39m) #93

rockyzhang24 opened this issue Dec 17, 2020 · 4 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@rockyzhang24
Copy link

Hi,

Thank you for your hardworking on bug fixes and new feature implements.

I just updated to 1.1.1 and I noticed that the ANSI support is still not perfect.
I run echo -e "\033[48;5;248m\033[38;5;40m 1 \033[39m 2 \033[38;5;196m 3" in the terminal, the output is shown below:
image
However, when I put it in a plugin script, the output is:
image

It seems that \033[39m, reset the foreground color to default, doesn't work well.

Similarly, \033[49m, reset the background color to default, doesn't work as well. Shown below:
Run in terminal:
image
Plugin:
image

Thank you very much. ❤️
Sorry that I keep reporting issues related to ANSI, Lol. On one hand, I really need this complex combination to implement my little plugin, and on the other hand, I wish SwiftBar to be as perfect as possible. Thanks for your patience!

@melonamin
Copy link
Contributor

Sorry that I keep reporting issues related to ANSI, Lol

Nothing to be sorry about, this feedback is very valuable.

Speaking to the issue itself - I know what is going wrong here and how to fix it, stay tuned.

@melonamin melonamin self-assigned this Dec 18, 2020
@melonamin melonamin added the bug Something isn't working label Dec 18, 2020
@melonamin melonamin modified the milestones: 1.1.1, 1.1.2 Dec 18, 2020
@rockyzhang24
Copy link
Author

Thank you for your kind words and quick fix. 👍🏻

melonamin added a commit that referenced this issue Dec 18, 2020
@melonamin
Copy link
Contributor

Please check this build when you have a chance
SwiftBar.zip

@rockyzhang24
Copy link
Author

Hi,
I have finished a quick test on the build and it worked perfectly (screenshot attatched below). 👍
image

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants