Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POWERLEVEL9K_MULTILINE_(FIRST/LAST)_PROMPT_PREFIX Not Applied #4

Closed
tjquillan opened this issue Mar 4, 2019 · 2 comments
Closed

POWERLEVEL9K_MULTILINE_(FIRST/LAST)_PROMPT_PREFIX Not Applied #4

tjquillan opened this issue Mar 4, 2019 · 2 comments

Comments

@tjquillan
Copy link

I have a config with:

POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=''
POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX="%F{012}❯ "

While this works on the powerlevel9k repository but when I switch to powerlevel10k these variables do not seem to be applied.

@romkatv
Copy link
Owner

romkatv commented Mar 4, 2019

When I define these options I get the same prompt in Powerlevel10k as in Powerlevel9k. Make sure you define all POWERLEVEL9K options before you source the theme. Powerlevel10k supports fewer dynamic configuration changes.

Here's how I tested it:

docker run -e LANG=C.UTF-8 -e LC_ALL=C.UTF-8 -e TERM=$TERM -it --rm ubuntu bash -c '
  set -uex
  apt update
  apt install -y zsh git
  cd
  git clone https://github.com/romkatv/gitstatus.git
  git clone https://github.com/romkatv/powerlevel10k.git
  echo "
    POWERLEVEL9K_PROMPT_ON_NEWLINE=true
    POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=""
    POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX="%F{012}❯ "
    source ~/gitstatus/gitstatus.plugin.zsh
    source ~/powerlevel10k/powerlevel10k.zsh-theme" >~/.zshrc
  zsh -i
'

@tjquillan
Copy link
Author

Fixed. Turns out some extra work is required with my plugin manager to ensure the configs are set prior to loading.

For possible future reference I will leave this here:
Plugin Manager: ZPlugin
Method of ensuring config before loading:

_config_powerline() {
    POWERLEVEL9K_MODE=nerdfont-complete
    POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(user dir vcs virtualenv)
    POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status)
    POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=''
    POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX="%F{012}❯ "
    POWERLEVEL9K_VCS_STATUS_COMMAND=gitstatus_query_dir
    POWERLEVEL9K_PROMPT_ON_NEWLINE=true
    POWERLEVEL9K_RPROMPT_ON_NEWLINE=false
}

zplugin ice atinit"_config_powerline"; zplugin light romkatv/powerlevel10k

xPMo pushed a commit to xPMo/powerdir10k that referenced this issue Mar 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants