My preferred shell is zsh with Oh My Zsh. After using the default theme for years, I recently switched to a more involved setup.
Here is an image of my current prompt:
This theme uses the following projects:
My terminal emulator is iTerm on OS X 10.11.
Install powerline fonts
The theme uses a number of non-standard glyphs for the prompt, so we need to use specially patched fonts that include them.
Clone the powerline fonts repo or download the latest master branch as a zip and unzip.
cd to the directory and run the install shell script to install the fonts:
To verify, open the OS X Font Book app and search for
powerline. There should be a number of results.
Note: if you're using this theme on a remote server over ssh you need the fonts (and color scheme) on your local machine.
Install iTerm color scheme (optional)
I have grown to like the Atom One Dark color theme. I chose to install it, but you can use any theme you want.
Clone the atom-one-dark repo or download the latest master branch as a zip and unzip.
Open iTerm preferences and navigate to "Profiles" then the "Colors" tab:
Click the "Color Presets" dropdown in the bottom right and then "Import...". Select
scheme/iTerm/One Dark.itermcolors file. Then select the "One Dark" theme from the "Color Presets" dropdown. Repeat for each profile as desired.
Configure iTerm fonts
Navigate to the "Text" tab:
For each profile:
- Deselect "Use a different font for non-ASCII text"
- Click "Change Font"
- Select a powerline patched font (if unsure, open Font Book app and search for "powerline")
Install the theme
This assumes Oh My Zsh is already installed and configured. If not, please visit the Oh My Zsh page and follow the installation instructions.
We need to clone the powerlevel9k theme into the Oh My Zsh themes directory:
$ git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
Then edit your
$ nano ~/.zshrc
And configure it to use the theme:
And, finally, reload our zsh config:
$ source ~/.zshrc