Instructions to set up a new mac (M1)

Instructions for when you need to setup a new mac

  1. Install Homebrew
  2. Install Command line tools (Homebrew should do this automatically)
  3. Install Rectangle (Used to be Spectacle, but Rectangle is compiled for apple silicon so I'll go with that!) brew install --cask rectangle
  4. Install iterm brew install --cask iterm2
  5. Install oh my zsh brew install zsh && sh -c "$(curl -fsSL"
  6. Install powerlevel10k brew install romkatv/powerlevel10k/powerlevel10k echo "source $(brew --prefix)/opt/powerlevel10k/powerlevel10k.zsh-theme" >>~/.zshrc
  7. Add zsh plugins: (zsh-autosuggestions colorize pip python etc.)
  8. Add zsh-syntax-highlighting
  9. Disable bell in iterm : Profiles -> Default -> Terminal -> Silence Bell
  10. Change iterm theme to minimal
  11. Change iterm background color & opacity in Window Tab
  12. Change iterm to unlimited scrollback in Terminal Tab
  13. Setup word skipping shortcuts in iterm ⌘←, ⌘→ and ⌥←, ⌥→ in Profiles -> Keys -> Key mappings -> Presets -> Natural Text Editing
  14. To change next tab. previosu tab shortcuts. Preferences -> Keys -> Key Bindings and change Next Tab and Previous Tab
  15. Tick use previous sessions working dir
  16. Change key repeat in Mac Systems Prefs
  17. Install vscode brew install --cask visual-studio-code
  18. Install vscode extensions: prettier, colourful brackets, react, python, semi-standard etc.
  19. Run git config --global status to add alias
  20. brew install yarn

Python setup 😦 I use pyenv

  1. brew update
  2. brew install pyenv
  3. echo 'eval "$(pyenv init --path)"' >> ~/.zprofile
  4. echo 'eval "$(pyenv init -)"' >> ~/.zshrc
  5. brew install openssl readline sqlite3 xz zlib
  6. pyenv install 3.10.0 (or latest version)
  7. Restart iterm
  8. if python -V still shows 2.7 or whatever, edit line in zshrc, see this stack overflow post:
  9. which python should show /Users/fred/.pyenv/shims/python
  10. brew install pyenv-virtualenv
  11. Set python 3.10 as global version: pyenv global 3.10.0
  12. Make virtualenvs for every project (these get saved to sepcific directories)
  13. Add eval "$(pyenv virtualenv-init -)" to zshrc
  14. If you use jupyter: install pyenv jupyter kernel This will create automatic kernels for each pyenv virtualenv.