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

Dark blue directory with black text - wrong colors #72

Open
SturmB opened this issue Apr 11, 2018 · 17 comments
Open

Dark blue directory with black text - wrong colors #72

SturmB opened this issue Apr 11, 2018 · 17 comments

Comments

@SturmB
Copy link

SturmB commented Apr 11, 2018

I followed all of the instructions (or so I thought) to get zsh installed, as well as oh-my-zsh and its agnoster theme. I also had to get the correct Solarized color themes and install them into terminal.app, as well as the Powerline fonts, including Meslo. Such a big process just to style up terminal to make it look pretty.

And yet, I must still be missing something.

screen shot 2018-04-11 at 1 51 14 pm

For whatever reason, the directory part of the prompt is showing as dark blue with black text. This is happening for both the Solarized Dark and Solarized Light color themes, which makes me think that it isn't in those color themes themselves. Regardless of whether or not it is, how can I fix this issue, as it's clearly not correct?

@SturmB
Copy link
Author

SturmB commented Apr 18, 2018

I just checked, and this problem also appears no matter which color profile is chosen in macOS' Terminal.app. I also downloaded the latest agnoster.zsh-theme and the problem is still showing when I open new terminal windows.

However, iTerm2 does not appear to have this issue. I can only speculate that I am missing some crucial setting in Terminal.app.

This is very annoying. Is there any way to get the correct color(s)?

@watson
Copy link

watson commented May 19, 2018

I have the same problem. I have resorted to typing pwd all the time to see which directory I'm in, but that's not really the best solution. I'm not sure what Terminal.app does different

@watson
Copy link

watson commented May 19, 2018

This StackOverflow question and answers might hint at the problem: https://stackoverflow.com/questions/36221252/terminal-and-iterm2-same-profile-ansi-colors-look-differently

@watson
Copy link

watson commented May 19, 2018

For now I've "solved" the issue by changing the default ansi color blue in Terminal.app. I've done that by clicking the blue color (top row, 5th from the left) in the Terminal.app color Profiles tab:

screen shot 2018-05-19 at 10 03 06

And then using the color picker to pick the color from the screen shot in this repo:

screen shot 2018-05-19 at 10 04 38

@RickyLin
Copy link

I'm using Oh-My-Zsh in Ubuntu 18.04 on Windows. I didn't find out a better solution but finally modified the theme itself.

vim ~/.oh-my-zsh/themes/agnoster.zsh-theme

Change the blue color to whatever color supported by terminal,
original theme

For example, I changed it to 076 and it looks like

new folder color

The problem is that I probably have to revert the change before I can update to a new oh-my-zsh version.

@SturmB
Copy link
Author

SturmB commented Jun 11, 2018

While this is still an issue, I've chosen to abandon the idea of using terminal.app in favor of iTerm2. I do, however, hope this bug (if it is a bug) gets resolved, though.

@webloginwu
Copy link

webloginwu commented Feb 4, 2019

I have the same problem
on the latest windows 10 WSL
I use the following solution based on RickyLin, the color became perfect.

vi ~/.oh-my-zsh/themes/agnoster.zsh-theme
change

prompt_dir() {
prompt_segment blue $CURRENT_FG '%~'
}

to
prompt_dir() {
prompt_segment 39d $CURRENT_FG '%~'
}

@knassef
Copy link

knassef commented Feb 26, 2019

For me this fixed it:

Go to Preferences > Profiles > Colors > Color Presents (on the bottom right) > Choose Solarized Dark

@RTrioux
Copy link

RTrioux commented Mar 24, 2019

For me this fixed it:

Go to Preferences > Profiles > Colors > Color Presents (on the bottom right) > Choose Solarized Dark

Thank you, it worked for me on Plasma / konsole :)

@SturmB
Copy link
Author

SturmB commented Mar 27, 2019

As I no longer use terminal.app, I am unsubscribing to this issue. I've no idea if it's been resolved with the proposed fixes above, so I'm not sure if I should close this issue, either.

@BClev
Copy link

BClev commented Jun 25, 2019

I have the same problem
on the latest windows 10 WSL
I use the following solution based on RickyLin, the color became perfect.

vi ~/.oh-my-zsh/themes/agnoster.zsh-theme
change

prompt_dir() {
prompt_segment blue $CURRENT_FG '%~'
}

to
prompt_dir() {
prompt_segment 39d $CURRENT_FG '%~'
}

Made this quicker by converting it to a single command:
sed -i '0,/blue/{s/blue/39d/}' ~/.oh-my-zsh/themes/agnoster.zsh-theme

@thejeff77
Copy link

thejeff77 commented Aug 5, 2019

Hey guys,

For terminal.app, use the solarized themes from this repository instead. It sets all of the colors correctly.

https://github.com/tomislav/osx-terminal.app-colors-solarized

@kohn1001
Copy link

for me what worked is changing the ansi colors blue and green (normal & bright) to the colors you want to be first-level & second level respectfully

@LuigiPower
Copy link

To have the standard white text on dark background in Terminal.app modify the agnoster.zsh-theme by setting PRIMARY_FG=white (or PRIMARY_FG=FFF which if what I'm using), then change

prompt_context() {
  local user=`whoami`

  if [[ "$user" != "$DEFAULT_USER" || -n "$SSH_CONNECTION" ]]; then
    prompt_segment $PRIMARY_FG default " %(!.%{%F{yellow}%}.)$user@%m "
  fi  
}

to

prompt_context() {
  local user=`whoami`

  if [[ "$user" != "$DEFAULT_USER" || -n "$SSH_CONNECTION" ]]; then
    prompt_segment black $PRIMARY_FG " %(!.%{%F{yellow}%}.)$user@%m "           
  fi
} 

I'm new to zsh so I don't know if this has side effects, but it seems to work just fine now.

@john1625b
Copy link

Go to Preferences in iterm then Profile then select the dark blue color and make it any light color you want like teal

@mutusfa
Copy link

mutusfa commented Mar 18, 2022

Agnoster doesn't work nicely with solarized dark, even with colors set correctly - context prompt hardcodes "black" color, which is very jarring:
image
I know I can change it to any value I want, but oh-my-zsh updates can break my changes. Also it would be nice if agnoster changed to white if SOLAROZED_THEME was set to light:
image

@asagajda
Copy link

On Ubuntu standard terminal theme with oh-my-zsh installed and agnoster theme turned on in ~/.zshrc

I turned this:
image

into this:
image

by adding into the ~/.zshrc the following:

prompt_dir() {
  # prompt_segment blue $CURRENT_FG '%~'
  prompt_segment blue white '%~'
}

Found the snippet in the ~/.oh-my-zsh/themes/agnoster.zsh-theme, so also it could be edited there.

You can see the default agnoster value
prompt_segment blue $CURRENT_FG '%~'

is replaced by
prompt_segment blue white '%~'

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

No branches or pull requests