Powerlevel9k / powerlevel9k

Powerlevel9k was a tool for building a beautiful and highly functional CLI, customized for you. P9k had a substantial impact on CLI UX, and its legacy is now continued by P10k.
https://github.com/romkatv/powerlevel10k
MIT License
13.46k stars 947 forks source link

colors not working on WSL+Ubuntu 18.04+Hyper terminal #1177

Open ghost opened 5 years ago

ghost commented 5 years ago

So I have Installed Ubuntu on my Windows 10 PC using WSL. I also have installed ZSH version 5.4.2 via apt. I also have successfully installed O-M-Z and powerlevel9k using their recommended install procedures.

It's working well EXCEPT that no matter what I do, the foreground/background colors seems to be limited/stuck.

  1. I have the background color for context to darkorange and foreground color to white. But all I get is black text on yellow background.
  2. I have also change the vcs color to black text in a white background but it's black text in a yellow background.

Any ideas what I could be doing wrong?

Thanks

onaforeignshore commented 5 years ago

Did you change the settings before you source the prompt or after? All settings need to be done before sourcing

dritter commented 5 years ago

The context segment is a stateful one. So just setting POWERLEVEL9K_CONTEXT_BACKGROUND=red won't work. You have to define for which status you want to change the color. See our documentation for how to customize stateful segments.

ghost commented 5 years ago

Did you change the settings before you source the prompt or after? All settings need to be done before sourcing

not sure what you meant but I tried:

  1. restarting hyper
  2. open a new tab to load latest .zshrc
  3. run source ~/.zshrc
ghost commented 5 years ago

The context segment is a stateful one. So just setting POWERLEVEL9K_CONTEXT_BACKGROUND=red won't work. You have to define for which status you want to change the color. See our documentation for how to customize stateful segments.

I never needed to use states when I tried on OSX High Sierra+Homebrew. I'll try your suggestion. Thanks


edit1: Correction to what I said above. I was using the DEFAULT state for context and instead of showing darkorange, it's using yellow.

POWERLEVEL9K_CONTEXT_DEFAULT_BACKGROUND="darkorange" POWERLEVEL9K_CONTEXT_DEFAULT_FOREGROUND="black" POWERLEVEL9K_CONTEXT_TEMPLATE="%n"