0

On macOS 13.1 (22C65) and using zsh in iTerm2 I'm trying to customize my shell.

I've made decent progress with my POWERLEVEL9K_DIR_CLASSES:

  • the path is white
  • all my BACGROUNDS are dark

I hope to specify a dir with a light BACKGROUND and so set a black FOREGROUND, but it only changed the icon and seperator color, not the text color, see below:

typeset -g POWERLEVEL9K_DIR_CLASSES=(
       '~/work(|/*)'               WORK      ''
       '~/Projets/Android(|/*)'    ANDROID   ''
       '~/Projets(|/*)'            PROJETS   ''

base 1 :

typeset -g POWERLEVEL9K_DIR_PROJETS_BACKGROUND=160

result :

enter image description here

problem :

typeset -g POWERLEVEL9K_DIR_ANDROID_BACKGROUND=148
typeset -g POWERLEVEL9K_DIR_ANDROID_FOREGROUND=232

the result : (all text should be black)

enter image description here

I don't know what I'm missing and why this behaves like that ?

1 Answers1

0

to change the color of the actual path as well, you also have to set SHORTENED_FOREGROUND and ANCHOR_FOREGROUNDbecause p10k uses shortened and anchor fallback:

typeset -g POWERLEVEL9K_DIR_[DIR_NAME]_SHORTENED_FOREGROUND=[color]  
typeset -g POWERLEVEL9K_DIR_[DIR_NAME]_ANCHOR_FOREGROUND=[color]

In my case it would be :

typeset -g POWERLEVEL9K_DIR_CLASSES=(
       '~/work(|/*)'               WORK      ''
       '~/Projets/Android(|/*)'    ANDROID   ''
       '~/Projets(|/*)'            PROJETS   ''

typeset -g POWERLEVEL9K_DIR_ANDROID_BACKGROUND=148 typeset -g POWERLEVEL9K_DIR_ANDROID_FOREGROUND=232 typeset -g POWERLEVEL9K_DIR_ANDROID_SHORTENED_FOREGROUND=232
typeset -g POWERLEVEL9K_DIR_ANDROID_ANCHOR_FOREGROUND=232

check this github issue for more details.

thanks to romkatv for the help.