Powerlevel9k: Antigen Caching Issues with powerlevel9k for font Glyphs

Created on 31 Oct 2017  路  7Comments  路  Source: Powerlevel9k/powerlevel9k

Hi,

I am having issues with Antigen caching. If the caching is enabled the glyphs and icons do not show up properly:

without caching:
screen shot 2017-10-30 at 11 20 53 pm

with caching:
screen shot 2017-10-30 at 11 22 00 pm

It is not a font or terminal problem but clearly comes from cahing. With caching disabled the terminal startup is quite slow. I tried zplug, it worked without a glyph issue but was even slower!

A simplified .zshrc is as follows:

POWERLEVEL9K_INSTALLATION_PATH="~/.antigen/bundles/bhilburn/powerlevel9k/"
POWERLEVEL9K_MODE="awesome-patched"
POWERLEVEL9K_ALWAYS_SHOW_CONTEXT=true
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=1
POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=3
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(status os_icon context dir dir_writable)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(vcs root_indicator background_jobs command_execution_time history)

antigen use oh-my-zsh
# ...
antigen bundle git
antigen bundle git-extra
antigen bundle github
# ...
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle zsh-users/zsh-completions
antigen bundle zsh-users/zsh-history-substring-search
antigen bundle zsh-users/zsh-syntax-highlighting

antigen theme bhilburn/powerlevel9k powerlevel9k

# Tell Antigen that you're done.
antigen apply
antigen question

All 7 comments

I tried zgen and I have the same issue.

@yahyavi - Your configuration looks sane. I'm actually not an antigen user myself, and am fairly unfamiliar with not only how it does caching but how it works, generally.

I just checked over in the @zsh-users antigen docs, though, and check it out, they have an example specifically showing how to handle P9k and caching =)

https://github.com/zsh-users/antigen/wiki/Commands#antigen-theme

Give it a shot and let me know if it helps!

Thanks. Yes, this is what I found also which led me to try ANTIGEN_CACHE=false (images in the original post) which does solve the glyph problem but it add considerably to startup time.

The weird thing is I am not dynamically loading bundles based on environment variables. The example they give is dynamically loading different themes depending on the terminal. In my case, I am not doing that, so maybe the issue is that internally powerlevel9k is loading different things depending on env variables and that somehow affects the caching in antigen. At least that would be my guess right now.

Can I ask what plugin manager do you use (if any)? I had the same problem with zgen. zplug worked correctly but was quite slow.

@yahyavi - Ah, bummer. I use Oh-My-Zsh as a plugin manager and don't have any issues (although OMZ also doesn't have caching like that).

P9k does indeed load different things depending on environment variables - specifically, font glyph configurations. It looks like that might be what's happening to you. Is there a way to force an overload of the Antigen cache? If so, forcing a load of the P9k font config would probably solve your problem. You're using awesome-patched, so it would specifically be this case in the switch statement:

https://github.com/bhilburn/powerlevel9k/blob/master/functions/icons.zsh#L17

Thanks, will look into it and report back if I find a solution.

resolved in the antigen 2.2.2 with proper caching.

@yahyavi - Great! Glad to hear it's been resolved. Thanks for updating the thread =)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

natemccurdy picture natemccurdy  路  5Comments

jpdoria picture jpdoria  路  5Comments

davidmpaz picture davidmpaz  路  3Comments

hackerwin7 picture hackerwin7  路  4Comments

controversial picture controversial  路  4Comments