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

Install Instructions

Michal Landsman edited this page Feb 26, 2017 · 41 revisions

There are two steps to start using this theme:

  1. Install the Powerlevel9k Theme
  2. Vanilla ZSH Install
  3. Oh-My-ZSH Install
  4. Prezto Install
  5. Antigen Install
  6. Zplug Install
  7. Zgen Install
  8. Antibody Install
  9. ZPM Install
  10. ZIM Install
  11. Install a Powerline Font
  12. Option 1: Use a Font that is Powerline Ready
  13. Option 2: Install Powerline Fonts
  14. Option 3: Install Awesome Powerline Fonts

To get the most out of Powerlevel9k, you need to install both the theme as well as Powerline-patched fonts, if you don't have them installed already. If you cannot install Powerline-patched fonts for some reason, follow the instructions below for a compatible install.

No configuration is necessary post-installation if you like the default settings, but there is plenty of segment configuration available if you are interested.

Step 1: Install Powerlevel9k

There are several ways to install and use the Powerlevel9k theme: vanilla ZSH, Oh-My-Zsh, Prezto, Antigen, Zgen, Antibody, ZPM and ZIM. Do one of the following, depending on how you use ZSH.

Option 1: Install for Vanilla ZSH

If you just use a vanilla ZSH install, simply clone this repository and reference it in your ~/.zshrc:

$ git clone https://github.com/bhilburn/powerlevel9k.git ~/powerlevel9k
$ echo 'source  ~/powerlevel9k/powerlevel9k.zsh-theme' >> ~/.zshrc
Option 2: Install for Oh-My-ZSH

To install this theme for use in Oh-My-Zsh, clone this repository into your OMZ custom/themes directory.

$ git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k

You then need to select this theme in your ~/.zshrc:

ZSH_THEME="powerlevel9k/powerlevel9k"
Option 3: Install for Prezto

To install this theme for use in Prezto, clone this repository into your Prezto prompt/external directory.

$ git clone https://github.com/bhilburn/powerlevel9k.git  ~/.zprezto/modules/prompt/external/powerlevel9k
$ ln -s ~/.zprezto/modules/prompt/external/powerlevel9k/powerlevel9k.zsh-theme ~/.zprezto/modules/prompt/functions/prompt_powerlevel9k_setup

You then need to select this theme in your ~/.zpreztorc:

zstyle ':prezto:module:prompt' theme 'powerlevel9k'

Please note if you plan to set a POWERLEVEL9K_MODE to use a specific font, as described in this section of the Wiki, you must set the MODE before prezto is loaded.

Option 4: Install for antigen

To install this theme for use in antigen, just add this in your ~/.zshrc:

antigen theme bhilburn/powerlevel9k powerlevel9k
antigen apply

Note that you should define any customizations at the top of your .zshrc (i.e. setting the POWERLEVEL9K_* variables) in your .zshrc.

Option 5: Install for Zplug

To install this theme for use in Zplug, just add this in your ~/.zshrc:

zplug "bhilburn/powerlevel9k", use:powerlevel9k.zsh-theme

Note that you should define any customizations at the top of your .zshrc (i.e. setting the POWERLEVEL9K_* variables) in your .zshrc.

Option 6: Install for Zgen

To install this theme for use in zgen, just add this in your ~/.zshrc:

zgen load bhilburn/powerlevel9k powerlevel9k

Note that you should define any customizations at the top of your .zshrc (i.e. setting the POWERLEVEL9K_* variables) in your .zshrc.

Option 7: Install for Antibody

To install this theme for use in Antibody, just add this in your ~/.zshrc:

antibody bundle bhilburn/powerlevel9k

Note that you should define any customizations at the top of your .zshrc (i.e. setting the POWERLEVEL9K_* variables) in your .zshrc.

Option 8: Install for ZPM

To install this theme for use in ZPM, just add this in your ~/.zshrc:

Plug bhilburn/powerlevel9k
source ~/.local/share/zpm/plugins/powerlevel9k/powerlevel9k.zsh-theme

Note that you should define any customizations at the top of your .zshrc (i.e. setting the POWERLEVEL9K_* variables) in your .zshrc.

Option 9: Install for ZIM

To install this theme for use in ZIM, clone this repository into your ZIM prompt/external-themes directory.

$ git clone https://github.com/bhilburn/powerlevel9k.git ~/.zim/modules/prompt/external-themes/powerlevel9k
$ ln -s ~/.zim/modules/prompt/external-themes/powerlevel9k/powerlevel9k.zsh-theme ~/.zim/modules/prompt/functions/prompt_powerlevel9k_setup

Add this at the beginning of your ~/.zshrc:

POWERLEVEL9K_INSTALLATION_PATH=~/.zim/modules/prompt/external-themes/powerlevel9k/powerlevel9k.zsh-theme

You then need to select this theme in your ~/.zimrc:

zprompt_theme='powerlevel9k'

Note that you should define any customizations at the top of your .zshrc just below POWERLEVEL9K_INSTALLATION_PATH (i.e. setting the POWERLEVEL9K_* variables) in your .zshrc.

Step 2: Install a Powerline Font

In order for the theme to render properly, you need a font that has the "Powerline" glyphs. These are used at the start & end of the segments to produce the "powerline" appearance. Additionally, if your font includes any of the expanded gif set, Powerlevel9k is capable of making use of those to produce a very nice prompt.

N.B.: If Powerlevel9k is not working properly, it is almost always the case that the fonts were not properly installed, or you have not configured your terminal to use a Powerline-patched font - (you must change it)!

There are four ways you can get a Powerline font:

Option 1: Use a Font that is Powerline-Ready

There are now some fonts, meant specifically for software programmers, that not only have the necessary powerline glyphs but also many of the additional glyphs from Font Awesome. The most well-known is Adobe Source Code Pro, which is usually available from your OS's package manager.

Once you have installed the font, configure your terminal to use that font. Powerlevel9k should then work immediately, with no additional configuration. If you wish to take advantage of the additional glyphs, put the following in your ~/.zshrc before you specify the powerlevel9k theme:

POWERLEVEL9K_MODE='awesome-fontconfig'
Option 2: Install Powerline Fonts

You can find the [installation instructions for Powerline Fonts here] (https://powerline.readthedocs.org/en/latest/installation/linux.html#fonts-installation). You can also find the raw font files in this Github repository if you want to manually install them for your OS.

After you have installed Powerline fonts, make the default font in your terminal emulator the Powerline font you want to use.

This is the default mode for Powerlevel9k, and no further configuration is necessary.

Option 3: Install Awesome Powerline Fonts

Alternatively, you can install Awesome Terminal Fonts, which provide a number of additional glyphs.

You then need to indicate that you wish to use the additional glyphs by defining the following in your ~/.zshrc before you specify the powerlevel9k theme:

POWERLEVEL9K_MODE='awesome-fontconfig'

If you chose to use already patched fonts, use instead :

POWERLEVEL9K_MODE='awesome-patched'

Note that if you prefer flat segment transitions, you can use the following with Awesome Powerline Fonts installed:

POWERLEVEL9K_MODE='flat'

Which looks like this:

Clone this wiki locally