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.47k stars 947 forks source link

Black vertical lines in command segments #1224

Open eblis opened 5 years ago

eblis commented 5 years ago

Describe Your Issue

I'm getting black vertical lines (gaps) between segments, very similar to the ones shown in the Troubleshooting page but only on the left prompt elements.

Have you tried to debug or fix it?

image

From what I can tell my .zshrc config is ok, here's part of it:

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH

export TERM="xterm-256color"
POWERLEVEL9K_MODE='nerdfont-complete'

VIRTUAL_ENV_DISABLE_PROMPT=1

DEFAULT_USER=liboteanc
POWERLEVEL9K_VCS_STATUS_COMMAND=gitstatus_query_dir
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir_writable ssh dir background_jobs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status command_execution_time vcs time)
#POWERLEVEL9K_ROOT_ICON=$'\uF09C'
#POWERLEVEL9K_TIME_ICON=$'\uF017'
#POWERLEVEL9K_CUSTOM_RPROMPT_ICON=\\uF005
POWERLEVEL9K_TIME_BACKGROUND=magenta
POWERLEVEL9K_BACKGROUND_JOBS_BACKGROUND=orange1
POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=black
POWERLEVEL9K_TIME_FORMAT="%D{%H:%M:%S}"
POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND="012"

#POWERLEVEL9K_STATUS_OK=false

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.

Syphdias commented 5 years ago

As far as I know, this is due to the font you use. I haven't found a font that does that perfectly especially the right side has been problematic for me. I use Cousine Nerd Font Regular with nerdfont-complete with is really close for me.

If somebody has a better fit, please let me know.

romkatv commented 5 years ago

Same here. It looks better with some fonts than with others but it never looks perfect.

The solution I've found is to stop using background altogether. As a bonus, it makes your prompt look lightweight and stylish. If this was the default, it's difficult to imagine many people would opt for the bulky prompt with background and useless icons.

Here's how my prompt looks like:

Pure Power

I removed all icons that don't add any information. For example, why have an icon of a clock in the time segment? For icons that do have meaning I chose non-bulky glyphs. You can see a regular + instead of the fat plus in a circle that is the default marker for staged files. The in the prompt is green if the last command has succeeded and red otherwise.

My config is here: https://github.com/romkatv/dotfiles-public/blob/master/.purepower.

romkatv commented 5 years ago

By the way, that POWERLEVEL9K_VCS_STATUS_COMMAND in your config doesn't do anything. It used to be required but not anymore. You can remove it. Powerlevel10k takes advantage of gitstatus automatically.

eblis commented 5 years ago

Hey Roman,

Thanks for replying and also for developing powerlevel10k which finally made me make the switch from powerline :)

Afair powerlevel10k is backwards compatible with 9k, have you tried merging the two repositories into a single one or are there irreconcilable differences between the two ?

romkatv commented 5 years ago

@eblis See https://github.com/bhilburn/powerlevel9k/issues/1170. I won't risk summarizing it.