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

Unable to display custom glyph using custom prompts #1299

Closed marcuskwan closed 5 years ago

marcuskwan commented 5 years ago

Describe Your Issue

What is happening? -> I am unable to display custom glyphs using custom prompts on my terminal. I am a beginner, so I apologize in advance !

Most issues are best explained with a screenshot. Please share one if you can!

Top half of zsh file image

Bot half of zsh file image

What iTerm2 looks like image

What my font book looks like image

Preferences text pane in iTerm2 based on an article image

Have you tried to debug or fix it?

Have you tinkered with your settings, and what happened when you did? Did you find a bit of code that you think might be the culprit? Let us know what you've done so far!

-> I feel like it has something to do with the way I am writing the code. I also have a suspicion about the fact that the MODE=nerdfont-complete line is different from the font folder I have installed called "Hack Font Nerd". I've googled and looked at the troubleshooting thread, filtered through issues with the keywords of glyph, icon, and custom. I have tried:

Environment Information

This information will help us understand your configuration.

Issues with Fonts & Icons

You may delete this section if your issue is not font / icon related.

romkatv commented 5 years ago

You need to add custom_javascript to prompt list.

POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(custom_javascript)

In addition, it's better to specify an icon for your custom prompt via a dedicated parameter, similarly to how you've defined its colors.

POWERLEVEL9K_CUSTOM_JAVASCRIPT_ICON=$'\ue781'
marcuskwan commented 5 years ago

@romkatv Thank you so much!!! 😄 Feel like such a dummy haha, I'll now work on seeing if I can display it without strings image Also, thank you for your work on PL10K!

romkatv commented 5 years ago

My pleasure.

By the way, remove this line from the top of your config:

source ~/powerlevel9k/powerlevel9k.zsh-theme

Otherwise zsh is wasting time loading p9k only to be overridden by p10k later on. By removing the line nothing should change but zsh should start a little bit faster.

marcuskwan commented 5 years ago

@romkatv Done! Much appreciated 😊