Setup, iTerm ColorScheme, ZSH Theme,
First install Homebrew
Next install iTerm2 with this:
# install iTerm
brew cask install iterm2
zsh
and Oh My zsh
:Then install the zsh
, an alternative to bash. The alternative to ~/.basrc
is ~./zshrc
, which you add extra scripts to that run when loading the terminal. (Mac OSX already come with zsh
but it is really outdated, we use the version from brew instead):
# install zsh
brew install zsh
Oh my zsh is a framework for managing your zsh
configuration. To install it use the below command:
# install oh my zsh
curl -L http://install.ohmyz.sh | sh
One of the cool things you can add with it is syntax highlighting:
# add syntax highlighting
cd ~/.oh-my-zsh && git clone git://github.com/zsh-users/zsh-syntax-highlighting.git
echo 'source ~/.oh-my-zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh' >> ~/.zshrc
Now to install theme for iTerm, go to iTerm ColorScheme and download the zip
file. To install, follow this:
.itermcolors
file(s) of the scheme(s) you'd like to useCurrent favorite themes are these one:
- Earthsong (current one with swapped Green Normal - Cyan Bright and modified cursor color).
- Afterglow.
- Birds Of Paradise.
- Fideloper.
- Later This Evening.
- Sea Shells.
- Sea Foam Pastel.
- Slate.
Add this to ~/.zshrc
so that it can recognize your existing alias and environment path:
source ~/.bash_profile
To change default open iTerm window size go to Preferences > Profile > Window > Setting for new Window
and increase Columns
and Rows
.
To hide scrollbar go to Preferences > Appearance > Hide Scrollbars
.
Powerlevel9k
:To change zsh
theme go to Oh My ZSH theme or zsh theme.
But for now we will use Powerlevel9k:
# install powerlevel9k theme
git clone https://github.com/bhilburn/powerlevel9k.git ~/powerlevel9k
echo 'source ~/powerlevel9k/powerlevel9k.zsh-theme' >> ~/.zshrc
In order for Powerlevel9k
to work, we need to install Nerd font. We will use the patched Source Code Pro Regular.
Download this file (download all if necessary):
Sauce Code Pro Nerd Font Complete.ttf
Double click and select Install
. After that select it in:
iTerm -> Preferences -> Profiles -> Text -> Font -> Change Font
After that add this line to ~/.zshrc
SOURCE:
POWERLEVEL9K_MODE='nerdfont-complete'
Add these to ~/.zshrc
:
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=()
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(user dir rbenv vcs)
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2
NOTE: All these theme settings should be called before setting the theme or it wont take effect, example:
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=()
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(user dir rbenv vcs)
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2
source ~/powerlevel9k/powerlevel9k.zsh-theme