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

How to adjust coloring of "git:" #62

Closed
stefanscheidt opened this issue Sep 14, 2015 · 2 comments
Closed

How to adjust coloring of "git:" #62

stefanscheidt opened this issue Sep 14, 2015 · 2 comments

Comments

@stefanscheidt
Copy link

Hi,

first: thank you very much for the great tool.

second: I'm quite a newbie regarding shell prompt customization, so ...

now: I'm using OS X terminal app with dark solarized color theme, see https://github.com/tomislav/osx-terminal.app-colors-solarized. Within this theme, the "git(...)" part of git-radar ist colored black with bad contrast to the dark backround. I haven't found a way to customize that. Can it be customized?

This may be related to issue #40 and #57 .

Again thanks for the great work!

Regards
Stefan

@michaeldfallen
Copy link
Owner

Recently released v0.4 should allow you to do this. All you need to do is export in your ~/.zshrc or ~/.bashrc a new format with your preferred colours in it.

For bash that would be:

GIT_RADAR_FORMAT=" \x01<your colour code>\x02git:(\x01\033[0m\x02%{remote: }%{branch}%{ :local}\x01<your colour code>\x02)\x01\033[0m\x02%{ :changes}"

replacing <your colour code> with something from the Bash colour codes list e.g. \033[0;36m for Cyan.

Note that you need to wrap the code in the \x01 and \x02 parts to tell your terminal emulator that these are non printing characters.

For zsh that would be:

GIT_RADAR_FORMAT=" %{<your colour code>%}git:(%{$reset_color%}%{remote: }%{branch}%{ :local}%{<your colour code>%})%{$reset_color%}%{ :changes}"

replacing <your colour code> with something from the Zsh colour codes list e.g. $fg[cyan] for Cyan.

Note that you need to wrap the code in the %{ and %} parts to tell your terminal emulator that these are non printing characters.

@stefanscheidt
Copy link
Author

Works great! Thank you!

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

No branches or pull requests

2 participants