Skip to content

Instantly share code, notes, and snippets.

@antruongnguyen
Created June 4, 2020 03:56
Show Gist options
  • Save antruongnguyen/50167e86c151158ffff15a394da88968 to your computer and use it in GitHub Desktop.
Save antruongnguyen/50167e86c151158ffff15a394da88968 to your computer and use it in GitHub Desktop.
Power up the terminal using iTerm2 and Oh-my-zsh

Power Up Terminal

Requires

  • Supported OS: macOS, Linux
  • Shell: zsh
  • Softwares:
    • Git
    • iTerm2 https://www.iterm2.com/
    • Oh My Zsh https://ohmyz.sh/

Installation

Experience Improvement

Auto Suggestions

  • zsh-autosuggestions https://github.com/zsh-users/zsh-autosuggestions

Fonts

  • Powerline fonts https://github.com/powerline/fonts
  • JetBrains Mono https://www.jetbrains.com/lp/mono/

Theme

  • By default, robbyrussell theme is using in oh-my-zsh but you can change it to other themes. My suggestion is Spaceship ZSH. It's simple and better than any other themes.
  • To install the spaceship theme, you might want to go through the guideline or using the following for quick started
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"

Configuration

iTerm2

  • Open iTerm2 Preferences > Profiles > Text
    • Change the font to Cousine for Powerline or JetBrains Mono
    • Adjust the font size to 14 or your preferred one
    • Check Use ligatures and Anti-aliased options
  • Open iTerm2 Preferences > Profiles > Window
    • Adjust Transparency to your prefer
    • Check Blur and adjust it
  • Open iTerm2 Preferences > Profiles > Terminal
    • Check Unlimited scrollback

Update .zshrc

  • Change the theme as ZSH_THEME="spaceship"
  • To disable current Kubernetes context info you might want to put SPACESHIP_KUBECONTEXT_SHOW="false"
  • Load Oh My Zsh plugins plugins=(git osx mvn docker kubectl helm zsh-autosuggestions)
  • Keep source ~/.profile before source $ZSH/oh-my-zsh.sh if you want to config/reuse your .profile
  • Your later customizations (not for oh-my-zsh) need to put after the line of source $ZSH/oh-my-zsh.sh
  • After all, remember running source .zshrc to update the changes.

Others

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment