Instructions to set up a new mac (M1)
Instructions for when you need to setup a new mac
- Install Homebrew
- Install Command line tools (Homebrew should do this automatically)
- Install Rectangle (Used to be Spectacle, but Rectangle is compiled for apple silicon so I'll go with that!)
brew install --cask rectangle
- Install iterm
brew install --cask iterm2
- Install oh my zsh
brew install zsh && sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- Install powerlevel10k
brew install romkatv/powerlevel10k/powerlevel10k echo "source $(brew --prefix)/opt/powerlevel10k/powerlevel10k.zsh-theme" >>~/.zshrc
- Add zsh plugins: (zsh-autosuggestions colorize pip python etc.)
- Add zsh-syntax-highlighting
- Disable bell in iterm : Profiles -> Default -> Terminal -> Silence Bell
- Change iterm theme to minimal
- Change iterm background color & opacity in Window Tab
- Change iterm to unlimited scrollback in Terminal Tab
- Setup word skipping shortcuts in iterm
⌘←, ⌘→ and ⌥←, ⌥→
in Profiles -> Keys -> Key mappings -> Presets -> Natural Text Editing - To change next tab. previosu tab shortcuts.
Preferences -> Keys -> Key Bindings
and changeNext Tab
andPrevious Tab
- Tick use previous sessions working dir
- Change key repeat in Mac Systems Prefs
- Install vscode
brew install --cask visual-studio-code
- Install vscode extensions: prettier, colourful brackets, react, python, semi-standard etc.
- Run
git config --global alias.st status
to add alias brew install yarn
Python setup 😦 I use pyenv
brew update
brew install pyenv
echo 'eval "$(pyenv init --path)"' >> ~/.zprofile
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
brew install openssl readline sqlite3 xz zlib
pyenv install 3.10.0
(or latest version)- Restart iterm
- if
python -V
still shows 2.7 or whatever, edit line in zshrc, see this stack overflow post: https://stackoverflow.com/questions/58679742/set-default-python-with-pyenv which python
should show/Users/fred/.pyenv/shims/python
brew install pyenv-virtualenv
- Set python 3.10 as global version:
pyenv global 3.10.0
- Make virtualenvs for every project (these get saved to sepcific directories)
- Add
eval "$(pyenv virtualenv-init -)"
to zshrc - If you use jupyter: install pyenv jupyter kernel https://github.com/aiguofer/pyenv-jupyter-kernel. This will create automatic kernels for each pyenv virtualenv.