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

Same glyph displays both properly and improperly in the prompt #1050

Open ruslaniv opened 6 years ago

ruslaniv commented 6 years ago

Describe Your Issue

I have a custom prompt set up to display time and date. Time is preceded by uf017 (clock) glyph and date is preceded by uf073 (calendar) glyph. The calendar glyph displays just fine, moreover, the built in clock glyph displays fine but the uf017 glyph displays improperly. echo "\uf017" prints the proper clock glyph

image

Have you tried to debug or fix it?

I read the troubleshooting guide and tried some fixes suggested there but nothing has helped.

Environment Information

zsh 5.0.2 (armv7hl-redhat-linux-gnu) Oh-My-ZSH Installed by cloning the repo P9K v 0.6.6 iTerm2 ssh'ed into Linux

Issues with Fonts & Icons

nerdfont-complete font-issues.zsh: https://gist.github.com/ruslaniv/1bbcd50b5a10cb5d3dea7e9b54afeb97 $ get_icon_names looks correct? - Yes

zshrc: ZSH_THEME="powerlevel9k/powerlevel9k" POWERLEVEL9K_TIME_FORMAT="%D{\uF017 %H:%M \uf073 %d.%m.%y}" POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context os_icon newline dir dir_writable vcs) POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs time) POWERLEVEL9K_MODE='nerdfont-complete'

POWERLEVEL9K_TIME_ICON=""

onaforeignshore commented 6 years ago

There are both date and time segments... You could use POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs time date_joined) to do the same and just set each segment's separate icon using $'\uF017' format.

ruslaniv commented 6 years ago

You mean something like this?

screenshot 2018-11-05 at 02 05 29

POWERLEVEL9K_TIME_FORMAT="%D{%H:%M}" POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context os_icon newline dir dir_writable vcs) POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs time date_joined) POWERLEVEL9K_MODE='nerdfont-complete' POWERLEVEL9K_TIME_ICON="\uf017"

But then how can I move the icons to be in front of the time and date respectively?

And why does the clock glyph displays fine this way but when I use it as: POWERLEVEL9K_TIME_FORMAT="%D{\uf017 %H:%M}" it does not work?