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

Troubleshooting

Ben Hilburn edited this page Apr 3, 2017 · 46 revisions

Here are some fixes to some common problems.

Gaps Between Segments

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.,).

Segment Colors are Wrong

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

Segment Separators are Wrong Color

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.

Strange Characters in Prompt

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.

Wrong Icons in prompt

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).

Strange Character / Segment Spacing

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.

Icons are cut off

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.

Background transparency

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:

Fix: Reduce the transparency in the settings of your terminal emulator (screenshot from iTerm):

Broken Umlauts/UTF-8 characters

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.

Gap After Right Prompt

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).

Clone this wiki locally