Skip to content

Latest commit

 

History

History
86 lines (55 loc) · 3.17 KB

oh-my-zsh-setup.md

File metadata and controls

86 lines (55 loc) · 3.17 KB

Prerequisites

(optional) install iterm2

Download the latest version of oh-my-zsh

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Install Powerline fonts

For example Firacode:

  • brew tap homebrew/cask-fonts
  • brew cask install font-fira-code

And then set the default font in iTerm under: Preferences / Profiles / Text.

There change the font to Fira Code and check the checkbox "Use built-in powerline glyphs".

Theme

Themes to choose from

My favorites :

  1. powerlevel10k
  2. spaceship

All of the themes available

Theme installation

Prerequisite: iTerm2 installed on the machine

Choose one of the following themes.

1. powerlevel10k theme

More info can be found here

Installation

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k

sed -i'.bak' -e 's/^\(ZSH_THEME=\s*\).*$/\ZSH_THEME=\"powerlevel10k\/powerlevel10k\"/' ~/.zshrc

rm .zshrc.bak

After the installation it will ask you to restart iTerm and will start the configuration wizard.

2. spaceship theme

More info can be found here

Installation

git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt"

ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"

sed -i'.bak' -e 's/^\(ZSH_THEME=\s*\).*$/\ZSH_THEME=\"spaceship\"/' ~/.zshrc

rm .zshrc.bak

source .zshrc

Plugins

List of plugins that are added

Add the zsh-syntax-highlighting plugin

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

Add the zsh-autosuggestions plugin

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

Add the plugins to the config file.

sed -i'.bak' -e 's/^\(plugins=\s*\).*$/\plugins=(git zsh-syntax-highlighting zsh-autosuggestions colored-man-pages ssh-agent)/' ~/.zshrc

If it fails, check this article

Activate the option to display red dots whilst waiting for completion by uncommenting the line

sed -i '/# COMPLETION_WAITING_DOTS=\"true\"/s/^#//g' ~/.zshrc

Remove backup of .zshrc file

rm .zshrc.bak

Reload the current shell

source .zshrc