-
Notifications
You must be signed in to change notification settings - Fork 928
Install Instructions
There are two steps to start using this theme:
- Install the Powerlevel9k Theme
- Vanilla ZSH Install
- Oh-My-ZSH Install
- Prezto Install
- Antigen Install
- Zplug Install
- Zgen Install
- Antibody Install
- ZPM Install
- ZIM Install
- Install a Powerline Font
- Option 1: Use a Font that is Powerline Ready
- Option 2: Install Powerline Fonts
- 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.
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.
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
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"
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.
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
.
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
.
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
.
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
.
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
.
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
.
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:
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'
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.
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: