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 949 forks source link

Does make sense to have POWERLEVEL9K__[plugin_name]_[BG|FG]_COLOR variables? #1395

Closed davidmpaz closed 4 years ago

davidmpaz commented 4 years ago

Hi šŸ‘‹,

this issue is related to #1349 and i think i am just missing how to connect the dots.

thanks in advance David

Describe Your Issue

Like in here: https://github.com/Powerlevel9k/powerlevel9k/blob/v0.6.7/powerlevel9k.zsh-theme#L1638

Colors, Background and Foreground colors are somehow hardcoded. So that's why the question: is that an overkill for the theme to have so many customization variables? Makes that sense to have? Is there a better solution for this?

Have you tried to debug or fix it?

I have solved that for the virtualenv plugin by changing the line to:

"$1_prompt_segment" "$0" "$2" "$POWERLEVEL9K_VIRTUALENV_BG_COLOR" "$POWERLEVEL9K_VIRTUALENV_FG_COLOR" "${virtualenv_path:t}" 'PYTHON_ICON'

then in a configuration file i export all those variables for the theme to configure it.

I could make a pull request for that, with as much plugins as possible providing default values as it is now.

Environment Information

zsh --version
zsh 5.7.1 (x86_64-apple-darwin19.0)

Oh-My-ZSH

cloned into: ~/.oh-my-zsh/custom/themes/powerlevel9k

c4a8118 (tag: v0.6.7)

iTerm

romkatv commented 4 years ago

Try this:

POWERLEVEL9K_VIRTUALENV_FOREGROUND=red
POWERLEVEL9K_VIRTUALENV_BACKGROUND=yellow
davidmpaz commented 4 years ago

Perfect!! Thanks for your help!!

romkatv commented 4 years ago

You are welcome.