Configuration of a beautiful (efficient) terminal and prompt on OSX in 7minutes

The result

The process to get it

1. Install and configure iTerm2

$ brew cask install iterm2
iTerm → Preferences → Profiles → Colors → Color presets → ImportThen again, Color presets → you-color-scheme-name

2. Install a patched font

You’ll get this result at the end, keep calm and follow this doc
iTerm2 → Preferences → Profiles → Text → Change Font

3. Install Zsh and Oh my Zsh

Don’t mind, you are close !
brew install zsh zsh-completions
$ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

4. Add Powerlevel9k Zsh Theme

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

5. Final tweaking

Before…
After 💮
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir rbenv vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs history time)
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
# Add a space in the first prompt
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX="%f"
# Visual customisation of the second prompt line
local user_symbol="$"
if [[ $(print -P "%#") =~ "#" ]]; then
user_symbol = "#"
fi
POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX="%{%B%F{black}%K{yellow}%} $user_symbol%{%b%f%k%F{yellow}%} %{%f%}"
iTerm2 → Preferences → Profiles → Text
→ Cursor : ✓ Vertical Bar
→ Blinking cursor : ✓ ON
iTerm → Preferences → Profiles → Keys → Load Preset… → Natural Text Editing
$ git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
Note: $ZSH_CUSTOM/plugins path is by default ~/.oh-my-zsh/custom/plugins
plugins=(

zsh-autosuggestions
)
$ brew install zsh-syntax-highlighting
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
Before
After (better readability)
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
Before
After
POWERLEVEL9K_VCS_MODIFIED_BACKGROUND=’red’
The final UI isn’t perfect, but is better
# Colorise the top Tabs of Iterm2 with the same color as background
# Just change the 18/26/33 wich are the rgb values
echo -e "\033]6;1;bg;red;brightness;18\a"
echo -e "\033]6;1;bg;green;brightness;26\a"
echo -e "\033]6;1;bg;blue;brightness;33\a"

6. Visual Studio Code config

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store