ohmyzsh/README-MY-SETUP.md
2023-02-07 22:39:13 -08:00

5.4 KiB

My Shell Setup

Much of my information comes from here and his YouTube video.

Note that this will backup and replace your existing ~/.zshrc file

You'll need zsh to install Oh My Zsh. Run zsh --version to check if you have it.

macOS

  • install HomeBrew (probably already installed)

  • install iTerm2

  • install/configure iTerm2 colour themes Grove Box contrib

  • install prereqs

    • need to install Nerd Fonts (may want other fonts but must be Nerd variety)

      brew tap homebrew/cask-fonts
      brew install --cask font-meslo-lg-nerd-font
      brew install --cask font-hack-nerd-font
      brew install --cask font-fira-nerd-font
      
    • Configure iTerm2 to use one of the nerd fonts (I like hack)

    • needed for oh-my-zsh module autojump

      brew install autojump
      brew install terminal-notifier
      brew install thefuck
      
    • install ls replacement exa

      brew install exa
      
  • continue to Common Install Steps

Linux

  • install some terminal tools

    sudo apt install exa autojump thefuck tmux
    
  • install Tilex

    sudo tilix
    
  • install/configure Tilex colour themes Grove Box for Tilix

  • install prereqs

    • If which zsh not installed, then install with sudo apt install zsh. Next, change your login shell with chsh -s $(which zsh)

    • need to install Nerd Fonts (may want other fonts but must be Nerd variety)

      • I download, expand, open Nautilus and double-click on each non-Windows font
    • configure Tilix to use the Nerd font (I like Hack)

  • continue to Common Install Steps

Windows

  • Install Windows Terminal
  • Recommend using WSL2 with Ubuntu and zsh installed there, but may be able to use Git Bash wsl --install (in Admin command prompt)
  • other steps TBD
  • continue to Common Install Steps

Common Install Steps

  • install Oh My Zsh customized fork

    • fork fklassen fork of oh-my-zsh to your personal account, or simpler yet use fklassen/ohmyzsh if you don't plan to modify anything

      https://github.com/fklassen/ohmyzsh/fork
      
    • if you forked, optionally modify README.md and tools/install.sh to point to your repo so that you don't need REPO=fklassen/ohmyzsh during installation

    • optionally customize forked repo to match your preferences

    • run installer

      • if you are using fklassen/ohmyzsh ...

        sh -c "$(curl -fsSL <https://raw.githubusercontent.com/fklassen/ohmyzsh/master/tools/install.sh>)"
        
      • if you forked your own repo ...

        REPO=<your_github_id>/ohmyzsh sh -c "$(curl -fsSL <https://raw.githubusercontent.com/fklassen/ohmyzsh/master/tools/install.sh>)"
        
    • initialize submodules

      cd ~/.oh-my-zsh
      git submodules update --init
      
    • optionally configure by editing '~/.zshrc` (see Getting Started)

      • I personally like to make a symbolic link so I can commit my changes to my forked config

        cd
        ln -sf ~/.oh-my-zsh/templates/zshrc.zsh-template .zshrc
        
  • install Starship

    • take a copy Starship config file

      mkdir -p ~/.config
      cd ~/.config
      ln -s ~/.oh-my-zsh/templates/starship.toml
      
    • run installer

      curl -sS https://starship.rs/install.sh | sh
      
  • install fzf for zsh-interactive-cd support

  • Start a terminal session

Post install

There are a few things that can make things even better

  • set up GIT configuration

    • cd && ln -s ~/.oh-my-zsh/plugins/gitconfig .gitconfig

    • create a ~/.gitconfig.user for user-specific GIT settings

      [user]
        name = Fred Klassen
        email = fred.klassen@broadcom.com
        #email = fklassen@appneta.com
        signingkey = 84E4FA215C934A7D97DC76D5E9E2149793BDE17E
      
  • create ~/.inputrc

    set editing-mode vi
    set bell-style none
    
  • install tmux config Oh My Tmux

  • install vim config SpaceVim

  • install Mosh replacement Eternal Terminal

  • on macOS