I recently setup a new MacBook as my primary machine and I made these notes in the hope they will streamline the process for me in the future.
Fix Trackpad Direction
System Preferences > Trackpad > Scroll & Zoom (tab)
Uncheck Scroll Direction: Natural
Close System Preferences
Fix Clock
System Preferences > Date & Time > Clock (tab)
Date Options:
- Uncheck
Show the day of the week
- Check
Show date
Install 1Password
https://1password.com/downloads/mac/
Download and Install
Install Brew
The brew website includes this command you can run to install.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Install Programs via Brew
brew cask install google-chrome
brew cask install harvest
brew cask install alfred
brew cask install macvim
brew cask install private-internet-access
brew cask install transmit
brew cask install iterm2
brew cask install slack
brew cask install zoom
brew cask install dropbox
brew cask install docker
brew cask install spotify
brew install git
brew install tmux
brew install neovim
brew install vim
brew install gpg
brew install ripgrep
Setup My Zsh Configuration
git clone git@github.com:salcode/salcode-zsh.git ~/salcode-zsh.git
ln -sf ~/salcode-zsh/zshrc ~/.zshrc
from https://github.com/salcode/salcode-zsh
Disable Beep in Zsh
echo "unsetopt BEEP" >> ~/.zshrc
Custom Git Aliases
echo 'alias gl="git lg"
alias gs="git status"
alias go="git checkout"
alias gc="git commit"
alias gds="git diff --staged"
alias gca="git commit --amend"
alias gcnv="git commit --no-verify"
alias gcnva="git commit --amend"' >> ~/.zshrc
Chrome Extensions
- 1Password extension (desktop app required)
- uBlock origin
- Privacy Badger
- JSONView
- ModHeader
- Harvest Time Tracker
Alfred Setup
- System Preferences > Keyboard > Shortcuts > Spotlight Uncheck Show Spotlight Search
- Alfred > Preferences > General > Alfred Hot Key (Command + Space)
- Alfred > Preferences > Features > File Search > Navigation > Check “Use ⏎ to open folders in Finder”
- Alfred > Preferences > Features > Actions > General > Selection Hotkey
⌥ ⌘ Space
- Alfred > Preferences > Features > Snippets
- Auto Expansion Options > Sounds > Uncheck both:
- Play sound when expanding Snippet
- Play sound when expanding Workflow Snippet Trigger
- Auto Expansion Options > Sounds > Uncheck both:
- Alfred > Preferences > Features > System > Uncheck all but
- Empty Trash
- Lock
Alfred Snippets
Alfred Workflows
Change Default App Files Open with
.txt open with MacVim
See https://osxdaily.com/2011/02/01/change-default-app-file-opens-with-mac/
Vim Configuration
mkdir ~/.config
mkdir ~/.config/nvim
touch ~/.config/nvim/init.vim
Put the following in ~/.config/nvim/init.vim
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath=&runtimepath
source ~/.vimrc
Run the following on the command line to install my Vim configuration
bash <(curl "https://raw.githubusercontent.com/salcode/ironcode-vim/master/install-ironcode-vim.sh")
SSH Keys
Add SSH Keys
Add SSH Keys to ~/.ssh/
– salcode-id-rsa.pub
– salcode-id-rsa
Configure SSH
Create ~/.ssh/config
and add the following:
Host *
UseKeychain yes
StrictHostKeyChecking no
IdentityFile ~/.ssh/salcode-id-rsa
Configure Git
Set Git to use main
as default branch
git config --global init.defaultBranch main
Install Git Enhancements
Install Composer
Install Composer Locally
Get the commands to run from https://getcomposer.org/download/
This is the command that needed to be run at the time this was originally written but it is likely it has since been updated, get the latest from the URL.
e.g.
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '572cb359b56ad9ae52f9c23d29d4b19a040af10d6635642e646a7caa7b96de717ce683bd797a92ce99e5929cc51e7d5f') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
Move Composer to be Run Globally
mv composer.phar /usr/local/bin/composer
Copy auth.json from old machine
Get ~/.composer/auth.json
on old machine and copy to new machine.
Configure Tmux
Follow the instructions at https://github.com/salcode/ironcode-tmux, i.e.
git clone git@github.com:salcode/ironcode-tmux.git ~/ironcode-tmux
ln -sf ~/ironcode-tmux/tmux.conf ~/.tmux.conf
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
tmux source ~/.tmux.conf
Run tmux and then from within tmux hit
Ctrl + b, I
Install NVM
See https://github.com/nvm-sh/nvm#install–update-script
e.g. At the time of this writing, the instructions say
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
nvm install stable
nvm use stable
then set global default versions with
nvm alias default node
Add Source Code Pro Font
- Download Source Code Pro
- Unzip the download file
- Double-click
SourceCodePro-Regular.ttf
(this will open the font in Font Book) - Click the
Install Font
button - Quiz iTerm2 if it is running
- Restart iTerm2
iTerm2 Settings
iTerm allow CLI Access to Clipboard
Preferences > General > Selection
Check “Applications in terminal may access clipboard”
Font
Preferences > Profiles > Text
Set the Font
to:
Source Code Pro
- Size
18
Bell
Preferences > Profiles > Terminal
Under Notifications
- check
Silence bell
- check
Flash visual bell
Finder Modifications
- Add my home folder to favorites sidebar
Screenshots
- How To Remove the Mac OS X Screenshot Delay
- Mac Change Screenshot Location
- Add screenshot directory to Favorites sidebar
Setup Quick Action to Convert Image to JPG
Follow Converting HEIC to JPG on a Mac
Leave a Reply