Closed DaRo0 closed 4 years ago
Have you set any P9K specific variables or is that happening with no extra configuration? If you have tried to customize or set any variables then the settings from your .zshrc or like file would be great to see. It looks like your background color is just set to black or some dark value when the git segment detects that git is not in a clean state.
Hello @Thutm ,
First I want to thank you for your time :)
I was using this tutorial: https://medium.com/@Clovis_app/configuration-of-a-beautiful-efficient-terminal-and-prompt-on-osx-in-7-minutes-827c29391961
So far, I've just used this p9k variables:
POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX="%{%B%F{black}%K{yellow}%} $user_symbol%{%b%f%k%F{yellow}%} %{%f%}"
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
POWERLEVEL9K_VCS_MODIFIED_BACKGROUND=’red’
My .zshrc file looks like this:
export ZSH="/Users/DaRo/.oh-my-zsh"
ZSH_THEME="powerlevel9k/powerlevel9k"
plugins=(
git
zsh-autosuggestions
)
source $ZSH/oh-my-zsh.sh
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir rbenv vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs history time)
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
# Add a space in the first prompt
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX="%f"
# Visual customisation of the second prompt line
local user_symbol="$"
if [[ $(print -P "%#") =~ "#" ]]; then
user_symbol = "#"
fi
POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX="%{%B%F{black}%K{yellow}%} $user_symbol%{%b%f%k%F{yellow}%} %{%f%}"
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
POWERLEVEL9K_VCS_MODIFIED_BACKGROUND=’red’
# Colorise the top Tabs of Iterm2 with the same color as background
# Just change the 18/26/33 wich are the rgb values
echo -e "\033]6;1;bg;red;brightness;18\a"
echo -e "\033]6;1;bg;green;brightness;26\a"
echo -e "\033]6;1;bg;blue;brightness;33\a"
export NVM_DIR="/Users/DaRo/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
export PATH="/usr/local/opt/mysql-client/bin:$PATH"
Where could I find the part where the colour for when git segment detects that git is not in a clean state is set? That's the part that I could never find.
If I can give you more info, please ask!
Thank you very much again!!!
Regards, Daniel
Try these:
POWERLEVEL9K_VCS_CLEAN_BACKGROUND POWERLEVEL9K_VCS_CLEAN_FOREGROUND POWERLEVEL9K_VCS_MODIFIED_BACKGROUND POWERLEVEL9K_VCS_MODIFIED_FOREGROUND POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND
Documentation might be missing in master branch. It appears to be in next branch though. You could check for reference configs here:
https://github.com/Powerlevel9k/powerlevel9k/wiki/Show-Off-Your-Config
That's perfect!
I can confirm you that the parameter:
POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND='yellow'
It was missing.
After adding it to the config, everything seems normal now.
Thank you for your help :)
Regards, Daniel
Not a problem, glad you got it working. If all is well, could you close out your issue?
For sure, I'll do it, thank you again :)
Hello everybody,
I checked the common issues sections and couldn't find an answer to my problem.
Describe Your Issue
My issue is, when having changes into a repository, the background for the branch is not showing.
I'll attach an image here: https://ibb.co/rvkWkk5
Have you tried to debug or fix it?
I've tried to debug it, but as my shell knowledge is limited, I was not being able to solve it.
Environment Information
Thank you everybody for your help, I'm sorry if I'm too noob to be able to solve this issue by myself