caiogondim / bullet-train.zsh

:bullettrain_side: An oh-my-zsh shell theme based on the Powerline Vim plugin
MIT License
2.83k stars 382 forks source link

Last arrow color slightly off? #118

Closed claymcleod closed 8 years ago

claymcleod commented 8 years ago

Hey @caiogondim,

Just bringing this to your attention --- wondering if this is a product of the font I'm using or the system configuration:

screen shot 2016-02-25 at 10 55 10 pm

See how the last arrow is slightly discolored? That just bugs me.

Oddly enough, that behavior only happens for the last arrow:

screen shot 2016-02-25 at 10 56 57 pm

FYI, I'm using Source Code Pro for Powerline. What font are you using?

dhayab commented 8 years ago

Hi, I also had this problem, and in my case it was fixed by reducing the window transparency in my terminal settings until the colors matched.

caiogondim commented 8 years ago

Transparency is only applied to background colours, not to foreground. This can also help you: https://github.com/caiogondim/bullet-train-oh-my-zsh-theme/issues/90

Let us know if you need more help.

vadviktor commented 8 years ago

Is it a Mac related issue? I am certainly not experiencing it in any of my Linux terminals, with or without transparency applied.

caiogondim commented 8 years ago

Guess it is related to the shell application you are using. I'm closing this issue.

You can reopen if it is not clear.

Cheers.

srrvnn commented 8 years ago

i see this issue while using Terminal.app. and changing transparency increases the difference in color for the Tomorrow Night Eighties theme. any luck fixing this once and for all?

alexcowell commented 6 years ago

@srrvnn I also had this issue with Terminal.app.

The fix is to set an explicit background colour for the last arrow, although please note that this will only work if the terminal background is set to 100% opacity, otherwise it will look weird.

I modified the prompt_end() function in bullet-train.zsh-theme like so:

prompt_end() {
  if [[ -n $CURRENT_BG ]]; then
    echo -n " %{%K{$BULLETTRAIN_PROMPT_BG}%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR%{%k%}"
  else
  ...
}

What this does is, for the final prompt arrow, set the background colour to BULLETTRAIN_PROMPT_BG, then reset afterwards. This prevents Terminal.app from increasing the brightness of the final arrow character, while preserving your colour scheme.

Simply set BULLETTRAIN_PROMPT_BG in your .zshrc to the ANSI colour code of your background theme and you should be good to go!

For example, in my case the prompt looked like this:

image

After applying the above fix to the theme and setting BULLETTRAIN_PROMPT_BG=15 in my .zshrc my prompt now looks like this:

image

CodeCommander commented 4 years ago

Any reason to not make this change in the default bullet-train.zsh-theme file?