Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Context icon not displayed properly #231

Closed
vinaychandra opened this issue Mar 9, 2016 · 7 comments
Closed

Context icon not displayed properly #231

vinaychandra opened this issue Mar 9, 2016 · 7 comments

Comments

@vinaychandra
Copy link

As you can see, the font is installed correctly but the prompt is breaking in between. What is the solution for this probelm
snapshot2

@dritter
Copy link
Member

dritter commented Mar 9, 2016

What do you mean by saying the prompt breaks in between? Do you want a multiline-prompt? If so, you need to set POWERLEVEL9K_PROMPT_ON_NEWLINE=true.

@vinaychandra
Copy link
Author

Sorry for my english. I meant that the icon that is being displayed is broken. In the first line, the home icon is partially displayed. I want to set it right

@dritter
Copy link
Member

dritter commented Mar 9, 2016

No need to apologize. I was to stupid to see the broken icon in the first place. 😄

The problem is quite complex, and has to do with how the terminal editor renders multi-width glyphs. So it is more an issue somewhere there (nothing we can really do about).

A quick solution could be to render more whitespace after the icon.. Set POWERLEVEL9K_HOME_ICON=$'\UE12C ' (note the whitespace after the codepoint). This codepoint is for awesome-patched-mode. If you use awesome-fontconfig, it should be \UF015.

It might also be a setting in your terminal emulator. Maybe there is somewhere a switch to treat all fonts as monospaced fonts..

Btw. which terminal emulator do you use? Is that terminix?

@vinaychandra
Copy link
Author

It is Konsole. Also the solution worked. But the problem is that this happens with almost all icons. So, it would be a head ache to find and fix every single location. It would be great if there is some other way. Anyway, thank you 😄 👍

@dritter
Copy link
Member

dritter commented Mar 9, 2016

Okay. Good to know. But did giving the icon more whitespace work?

@vinaychandra
Copy link
Author

Yes. Giving the icon more whitespace worked. Thank you 😃

@9ao9ai9ar
Copy link

@vinaychandra I patched the problem using this ugly code:

for key in ${(k)icons[@]}
do
    if [[ ! $key =~ 'SEPARATOR' ]]
    then
        icons[$key]=" ${icons[$key]} "
    fi
done

Add it after antigen apply in your .zshrc.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants