Closed Gary-Armstrong closed 4 years ago
dir
has states, so you need to set POWERLEVEL9K_DIR_${STATE}_BACKGROUND
instead of POWERLEVEL9K_DIR_BACKGROUND
. Accepted values of ${STATE}
are: DEFAULT
, HOME
, HOME_SUBFOLDER
, NOT_WRITABLE
and ETC
.
Yep, my bad here. Thanks for the tip. Got it working like so: POWERLEVEL9K_DIR_HOME_FOREGROUND='white' POWERLEVEL9K_DIR_HOME_BACKGROUND='019' POWERLEVEL9K_DIR_HOME_SUBFOLDER_FOREGROUND='white' POWERLEVEL9K_DIR_HOME_SUBFOLDER_BACKGROUND='019' POWERLEVEL9K_AWS_FOREGROUND='000' POWERLEVEL9K_AWS_BACKGROUND='142'
Note that you'll still get the original colors when your current directory is outside of $HOME
. To get the same colors everywhere you need to override colors for all 5 states.
Describe Your Issue
What is happening? Changing POWERLEVEL9K_DIR_BACKGROUND in .zshrc not reflected after
source ~/.zshrc
I searched issues, did not find any similar, and therefore assume I am doing something wrong.Have you tried to debug or fix it?
Just started customizing this morning after doing a
git pull
. I'm assuming I'm doing something wrong here. Read the docs. Changing the aws segment color works fine.What I have in .zshrc now: POWERLEVEL9K_PROMPT_ON_NEWLINE=true POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir aws vcs) POWERLEVEL9K_DIR_BACKGROUND='white' POWERLEVEL9K_AWS_FOREGROUND='yellow'
The aws segment is yellow on red but the dir segment is black on blue. I toggled the settings a few times to confirm this behavior.
Environment Information
This information will help us understand your configuration.
What version of ZSH are you using? You can use
zsh --version
to see this. zsh 5.7.1 (x86_64-apple-darwin18.2.0)Do you use a ZSH framework (e.g., Oh-My-ZSH, Antigen)? Oh-My-Zsh
How did you install P9k (cloning the repo, by tarball, a package from your OS, etc.,)? Clone repo into ~/.oh-my-zsh/custom/themes/powerlevel9k
What version of P9k are you using? Master as of 16 Mar 2020
Which terminal emulator do you use? iTerm2
Issues with Fonts & Icons
Probably not a font issue. ===== Font debugging ===== You are using iTerm2 with Font DroidSansMonoForPowerline 11
Your font settings seem to be all right. If you still have issues, it is more likely to be a font issue than a Powerlevel9k related one.