Code Monkey home page Code Monkey logo

Comments (17)

webloginwu avatar webloginwu commented on June 25, 2024 42

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 '%~'
}

from agnoster-zsh-theme.

watson avatar watson commented on June 25, 2024 23

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

from agnoster-zsh-theme.

knassef avatar knassef commented on June 25, 2024 22

For me this fixed it:

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

from agnoster-zsh-theme.

BClev avatar BClev commented on June 25, 2024 17

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

from agnoster-zsh-theme.

RickyLin avatar RickyLin commented on June 25, 2024 10

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.

from agnoster-zsh-theme.

SturmB avatar SturmB commented on June 25, 2024 3

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)?

from agnoster-zsh-theme.

RTrioux avatar RTrioux commented on June 25, 2024 3

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 :)

from agnoster-zsh-theme.

thejeff77 avatar thejeff77 commented on June 25, 2024 2

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

from agnoster-zsh-theme.

asagajda avatar asagajda commented on June 25, 2024 2

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 '%~'

from agnoster-zsh-theme.

kohn1001 avatar kohn1001 commented on June 25, 2024 1

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

from agnoster-zsh-theme.

watson avatar watson commented on June 25, 2024

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

from agnoster-zsh-theme.

watson avatar watson commented on June 25, 2024

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

from agnoster-zsh-theme.

SturmB avatar SturmB commented on June 25, 2024

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.

from agnoster-zsh-theme.

SturmB avatar SturmB commented on June 25, 2024

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.

from agnoster-zsh-theme.

LuigiPower avatar LuigiPower commented on June 25, 2024

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.

from agnoster-zsh-theme.

john1625b avatar john1625b commented on June 25, 2024

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

from agnoster-zsh-theme.

mutusfa avatar mutusfa commented on June 25, 2024

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

from agnoster-zsh-theme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.