-
Notifications
You must be signed in to change notification settings - Fork 0
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
Colorised output doesn't work in xbar #1
Comments
Ok, I couldn't replicate the issue on my Big Sur machine but I’m familiar with the issue. This plugin was originally written for BitBar and was later rewritten for SwiftBar when BitBar seemed like a dead project. I think going back to an older version of the script should fix this issue. Open
Add 2 more backslashes to the beginning each color code like so:
Refresh the plugin and let me know if that fixes it. Swiftbar and Bitbar/Xbar both handle escaping color codes differently. I’ll put out an update to address this later today if this fix works. |
Thanks for your answer! |
After a little debugging, I can reproduce this issue. It looks like the way that xbar handles color codes has changed again and most other scripts are using the built in In the mean time, I recommend using |
Looks like xbar doesn’t support xterm-256 colors. The only way to get this to work is to ask the xBar team to add support. I don’t think theres anything else I can do at this point :( |
Good news! Looks like colorized output was added in a recent pull request, it will be included in the next beta release. If you want the feature now, you can alway try compiling and running the latest version of xbar. I’m going to wait until the next official release to test Yabai-Spaces, but looking at the test code, the script should work out of the box with no additional changes necessary and it should be completely cross compatible with swiftbar! 🎉🎉 |
Thanks for your help. |
Hmm, thats surprising. Do you mind removing the current version of the plugin from your swiftbar folder and installing the latest release (v1.5) of the plugin instead. If that doesn’t fix it, can you share what settings you used to configure the plugin and a screenshot of what the menubar looks like? |
Hi, I'm seeing the same symptoms using the plugin with swiftbar. Colors work fine if I run the script in the terminal. swiftbar tells me the script version is 1.0, but it was copied and pasted from here today (16th Nov 21). Yabai and swiftbar are also fresh installs via brew. This is on an m1 mac. |
Looks like the script version was my bad 😅 , I simply forgot to update the version number in the header. Also, did you try the steps mentioned above?
Also, I’m currently on an Intel Mac, so if this is an m1 specific issue, I might not be able to address it until I get my m1 MBP sometime early next year. |
Here's the first part of the sh file, with the settings:
|
Hmm, looks like it’s not properly escaping the color codes. Can you try adding a backslash before the color codes? e.g:
I just upgraded to Monterey and am currently beta testing yabai v4. Since it has breaking changes, I will have to update the plugin to support v4 users. |
Just tried it with double backslashes, no difference :-( |
Ok, do you mind answering a few questions for me? What version of yabai are you running, what version of MacOS are you running, and can you post a screenshot of what the plugin looks like when you run it with double backslashes? |
thanks @gkzhb ! That did it. Changing line 191 of yabai.1d.sh to the following fixes it:
|
Try to use plugin for xbar(v.2.0.42-beta).
Catolina 10.15.7.
Interpretator ZSH.
Instead of number 5 blue (5th desktop), I have : [0;37m 1 2 3 4 [0;34m 5 [0;37m 6
When I run the script in terminal, the output is colorised.
The text was updated successfully, but these errors were encountered: