-
Notifications
You must be signed in to change notification settings - Fork 944
Troubleshooting
Here are some fixes to some common problems.
You can see this issue in the screenshot, below:
Thankfully, this is easy to fix. This happens if you have successfully installed Powerline fonts, but did not make a Powerline font the default font in your terminal emulator (e.g., 'terminator', 'gnome-terminal', 'konsole', etc.,).
If the color display within your terminal seems off, it's possible you are using
a reduced color set. You can check this by invoking echotc Co
in your
terminal, which should yield 256
. If you see something different, try setting
xterm-256color
in your ~/.zshrc
:
TERM=xterm-256color
If the segment separators in your prompt are a different shade than the segments themselves, like this:
then the issue is your terminal emulator. This issue is most common in OSX's default Terminal
application. If you are on OSX, you will need to use an alternative emulator, like iTerm2 to see the proper colors.
If your prompt shows strange character like this:
it is most likely that you set POWERLEVEL9K_MODE="awesome-patched"
, but
did not install an awesome-terminal-font. For most other modes, you need a powerline-patched font.
a.k.a. "Mediumgate". If you use POWERLEVEL9K_MODE="awesome-fontconfig"
and some icons are wrong (like status showing the green Medium.com-"M" instead of a checkmark, this is most likely because the codepoints of your font changed. We try to fix these as soon as we discover that fonts have changed codepoints, and updating your Powerlevel9k code should solve the problem (see #382 for an example).
If your prompt looks like this:
It's likely you are using iTerm2 and have "Double-Width Characters" enabled. Be sure this setting is disabled.
If you notice cut off icons like this:
It's probably because your terminal emulator is not capable of displaying double-width glyphs. KDEs Konsole
is well known for such a behaviour. Luckily there is a workaround for that. Try adding a whitespace after the code point, example: POWERLEVEL9K_HOME_SUB_ICON=$'\UE18D ' # <- Whitespace added
.
You can get a list of all icons by calling get_icon_names
.
Some terminal emulators have a feature to reduce the opacity of the background. That does not play with powerline-like shell themes, because the segment separators are print in the foreground (so, are like text) and the transparency feature just adjusts the opacity of the background. So your segments will look like this:
Best fix: Some terminal emulators, like iTerm, allow you to keep background colors opaque while still making the terminal background transparent. See the checkbox in this screenshot:
Next best fix: Reduce the transparency in the settings of your terminal emulator (screenshot from iTerm):
If you use a language other than English, it is quite likely that you set your computers locale
to your own language. To display the icons in the P9k prompt correctly we must set a default locale. We chose en_US.utf8
, because it is probably the most widespread locale in use. So, it might happen that you have en_US.utf8
not installed, which will break your local characters. Folder names will appear like this:
To fix this problem, please install en_US.utf8
. Don't worry, you do not have to overwrite your own locale.
To get a list of installed locales, type locale -a
.
Right Prompts (RPROMPTs) in ZSH have a gap between the last character of the prompt and the edge of your terminal emulator. You can see this in the image, below, where the top line is P9k and the bottom line is tmux
:
Unfortunately, as explained here, this is a bug in ZSH. The workaround is to set ZLE_RPROMPT_INDENT=0
, but this has the side effect of shifting your cursor when you press TAB
(see #364).
Question: I've been Googling this for more than an hour, - and I can't find any answer to it. I've tried a various of difference flags in my .zshrc-file, without any result.
Are there a documentation of where the colors are being displayed? Or how can I remove the colors in the specific case?
Answer: ... ?
Why do I get an error, when I start my terminal or a new tab? It disappears as soon as I write a valid command:
I can't get it to print the status-error, now matter what I do. I've tried setting this command in the .zshrc-file:
POWERLEVEL9K_STATUS_VERBOSE="true"
But it doesn't print anything... :-/
Answer: You can get a very verbose output by adding set -xe
in your .zshrc
-file and restarting your terminal. In this specific case, then something tried to call a removed RVM-script.
In this specific case, then it was Adobe Dreamweaver which had put the call into a .zlogin
-file. By removing that line, then it got resolved. You can read the whole process here: Powerlevel9k rvm error