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

Ask me, there are vertical lines. It looks strange. What's the reason? #1300

Closed MaxBill closed 5 years ago

MaxBill commented 5 years ago

TIM图片20190606094343

The picture above is my terminal, with vertical lines.

Seeing how other people's tutorials are configured is like this: TIM图片20190606094351

Replacement of another terminal also shows a vertical line, what is the reason?

romkatv commented 5 years ago

The presence and the size of the gap depends on your font. The arrows you see in your right prompt are made of two symbols: a left-pointing triangle and a space. You can print a blue arrow manually with print -P '%F{blue}\uE0B2%f%K{blue} %k'.

arrow

To eliminate the gaps you can either try another font (I'm using Meslo LG S Regular Nerd Font Complete Mono in the above screenshot) or change the style of your prompt to get rid of the arrows altogether.

I'm personally using the latter approach combined with Powerlevel10k (it's the same as Powerlevel9k but much faster). By starting with Pure Power instead of the default configuration you'll get a modern, functional and fast prompt rather than being stuck with visual noise. Another advantage is that it works with any font. You can try it like this:

git clone https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
( cd && curl -fsSLO https://raw.githubusercontent.com/romkatv/dotfiles-public/master/.purepower )
# This will make your prompt faster without changing its appearance.
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>! ~/.zshrc
# This will change the appearance of your prompt. You can edit ~/.purepower to customize it further.
echo 'source ~/.purepower' >>! ~/.zshrc
MaxBill commented 5 years ago

Thank you for answering my questions. Installed Powlevel10k or has a vertical display. I'll try to install the font you said.