I followed the instruction on wiki:
antigen theme bhilburn/powerlevel9k powerlevel9k
antigen apply
but antigen throws an error:
Script location could not be found! Maybe your POWERLEVEL9K_INSTALLATION_PATH is not correct?
I set an environment variable at the top of my .zshrc:
export POWERLEVEL9K_INSTALLATION_PATH=$HOME/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-bhilburn-SLASH-powerlevel9k.git
then this error disappeared. However, the theme won't load automatically. I must load it by executing antigen theme bhilburn/powerlevel9k powerlevel9k manually.
my .zshrc configuration is
source $HOME/Playground/antigen/antigen.zsh
export POWERLEVEL9K_INSTALLATION_PATH=$HOME/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-bhilburn-SLASH-powerlevel9k.git
# Load the oh-my-zsh's library.
antigen use oh-my-zsh
# Bundles from the default repo (robbyrussell's oh-my-zsh).
antigen bundle git
antigen bundle heroku
antigen bundle pip
antigen bundle lein
antigen bundle command-not-found
# Syntax highlighting bundle.
antigen bundle zsh-users/zsh-syntax-highlighting
# Load the theme.
export POWERLEVEL9K_INSTALLATION_PATH=$HOME/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-bhilburn-SLASH-powerlevel9k.git
antigen theme bhilburn/powerlevel9k powerlevel9k
# Tell Antigen that you're done.
antigen apply
That's weird...I deleted .antigen dir and re-open zsh and everything goes well...I don't know why :(
Hah, well, not sure how to explain that, but glad you're all set, now :)
running into the same original error - this was after an antigen selfupdate / antigen update on all modules.
Deleted .antigen as noted above, and upon opening a new shell, I get this error:
Script location could not be found! Maybe your POWERLEVEL9K_INSTALLATION_PATH is not correct?
(pwd now: ~/.antigen/bundles/bhilburn/powerlevel9k)
Antigen: Failed to load theme.
My .zshrc config reads:
`ZSH=$HOME/.oh-my-zsh
source $HOME/source/dot.hoagie/antigen/antigen.zsh
antigen use oh-my-zsh
antigen bundles <
heroku
pip
python
command-not-found
tmux
unixorn/tumult.plugin.zsh
zsh-users/zsh-syntax-highlighting
trapd00r/zsh-syntax-highlighting-filetypes
zsh-users/zsh-history-substring-search
peterhurford/up.zsh
common-aliases
git-extras
git-flow
EOBUNDLES
antigen theme bhilburn/powerlevel9k powerlevel9k
antigen apply`
Super odd, as until the most recent antigen selfupdate am at Antigen v1.2.1, had been using powerlevel9k for months without error.
What helped me.
POWERLEVEL9K_INSTALLATION_PATH=$ANTIGEN_BUNDLES/bhilburn/powerlevel9k
before the antigen theme bhilburn/powerlevel9k powerlevel9k
~/.antigen (I used antigen from HomeBrew)Your terminal should now reinstall all of antigen's packages again and powerlevel should be backup again.
The reason powerlevel failed is because antigen bundles have been moved from repo directory to bundle in Antigen 2. The first step resolves this so antigen can find powerlevel again
@casoetan yeah it really works, but what makes me confused is that the wiki doesn't tell users to put this line in .zshrc...
Updated the wiki with this information.
Thanks for the help @casoetan ! I hope it will be unnecessary to manually set the installation path (see https://github.com/bhilburn/powerlevel9k/pull/482#issuecomment-295357081 ). That hopefully brings relief.
@mrtanuky yes, sorry about that. We can't follow every ZSH framework.. :/
$ANTIGEN_BUNDLES/bhilburn/powerlevel9k/powerlevel9k.zsh-theme, instead of the suggested $ANTIGEN_BUNDLES/bhilburn/powerlevel9k.zsh-theme, as the value of POWERLEVEL9K_INSTALLATION_PATHSo, I figure some scheduled update happened and my shells are no longer ||D || ||\/|| ||D and I came here looking for a solution. Looks like antigen made some foundational updates that are causing some ripples.
Following the instructions with a "grain of salt", I delete .antigen contents, re-clone the repo back into .antigen, re-start iTerm, let antigen re-install all my bundles and ... this env var ANTIGEN_BUNDLES is never defined. Ever. No matter how times I restart iTerm.
Fail
antigen version === Antigen v2.0.2 (16f3fc2)
So, I decided to create the missing var in ~/.zshenv: ANTIGEN_BUNDLES=$HOME/.antigen/bundles
Documentation states, set the var POWERLEVEL9K_INSTALLATION_PATH=$ANTIGEN_BUNDLES/bhilburn/powerlevel9k.zsh-theme
Fail
Set to the actual path of the antigen installed theme:
POWERLEVEL9K_INSTALLATION_PATH=$ANTIGEN_BUNDLES/bhilburn/powerlevel9k/powerlevel9k.zsh-theme
Success
Just the sunoterra's solution solved my problem. Thank you.
After the antigen init/.antigenrc introduction I factored out the configuration of powerlevel9k anyway:
In .zshrc:
# ...
source /opt/antigen/antigen.zsh
source $HOME/.antigen-theme-conf
antigen init .antigenrc
# ...
With this, this file .antigen-theme-conf becomes a good point as where to add the newly required variable:
# Theme config
# antigen theme bhilburn/powerlevel9k powerlevel9k
POWERLEVEL9K_INSTALLATION_PATH=$ANTIGEN_BUNDLES/bhilburn/powerlevel9k/powerlevel9k.zsh-theme
POWERLEVEL9K_MODE='nerdfont-fontconfig'
# POWERLEVEL9K_PROMPT_ON_NEWLINE=true
POWERLEVEL9K_TIME_FORMAT="%D{%H:%M:%S %d.%m.%y}"
# Std has become an ugly M or such
# POWERLEVEL9K_OK_ICON=$'\UF00C'
# POWERLEVEL9K_FAIL_ICON=$'\UF00D'
POWERLEVEL9K_VCS_GIT_ICON=$'\UF296'
# POWERLEVEL9K_VCS_TAG_ICON=$'\UF121'
# F1D3 is the general git icon
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=""
POWERLEVEL9K_MULTILINE_SECOND_PROMPT_PREFIX="\UF120 "
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status time)
Thanks for finding out @sunoterra
Most helpful comment
Updated the wiki with this information.