These items are ordered by priority to reduce annoyance when first setting up a new mac.
- Investigate using https://github.com/kobus-v-schoor/dotgit for managing dot file syncing
mkdir ~/Library/KeyBindings ; vim ~/Library/KeyBindings/DefaultKeyBinding.dict
Enter the following code:
{
// Mac has built-in C-k support, but it doesn't put the killed text onto the
// system clipboard (you have to C-y to access the killed value). The
// following line puts it on the clipboard instead.
"^k" = (setMark:, moveToRightEndOfLineAndModifySelection:, cut:);
"^ " = setMark:;
"^/" = undo:;
"^w" = deleteToMark:;
"^v" = pageDown:;
"~b" = moveWordBackward:;
"~c" = (capitalizeWord:, moveForward:, moveForward:);
"~d" = deleteWordForward:;
"~f" = moveWordForward:;
"~l" = (lowercaseWord:, moveForward:, moveForward:);
"~u" = (uppercaseWord:, moveForward:, moveForward:);
"~v" = pageUp:;
"~w" = (deleteToMark:, setMark:, yank:, swapWithMark:);
"~B" = moveWordBackwardAndModifySelection:;
"~F" = moveWordForwardAndModifySelection:;
}
(The "~ " one gets Mac to not insert non-breaking spaces on Opt + Space.)
You can verify that this worked by restarting Chrome and then doing Opt + F/B in the URL bar. It should do word forward/backward instead of printing glyphs.
Disable the press-and-hold for accents feature to enable key repeating:
defaults write -g ApplePressAndHoldEnabled -bool false
To avoid having to use Touch ID every time you autofill a password, go to chrome://password-manager/settings and toggle off the "Use your screen lock when filling passwords" setting.
Do this in System Preferences.
Also install the 1Password Chrome extension. This might automatically be done for you when you sign into Chrome. You will need to get the classic extension which doesn't require a 1Password account.
- Accessibility
- Display > Pointer > Shake mouse pointer to locate: off
- Appearance
- Appearance: Dark
- Click in the scroll bar to: Jump to the spot that's clicked
- Menu Bar
- Sound > Always Show
- Desktop & Dock
- Automatically hide and show dock: on
- Close windows when quitting an app: off
- Hot Corners:
- Top left: none
- Top right: none (RIP Dashboard)
- Bottom right: Start Screen Saver
- Bottom left: Desktop
- Siri: disabled
- Touch ID & Password
- Touch ID: Add both index fingers and the right index finger twice (for better coverage)
- Use Touch ID for autofilling passwords: off (so Safari will autofill without a prompt)
- Unlock with Apple Watch: on
- Sound
- Play sound on startup: off
- Keyboard
- Keyboard
- Key Repeat: fastest
- Delay Until Repeat: one short of fastest
- Text input > Input Sources > Edit...
- Add period with double-space: off
- Keyboard
- Trackpad
- Point & Click
- Tracking speed: slightly below middle
- Tap to click: on
- Quiet Click: on
- Force Click: off
- More Gestures
- Swipe between pages: off
- Point & Click
- Mouse
- Scroll direction: Natural
- Secondary click: on
- Tracking speed: one above middle
- Displays
- Night Shift: Sunset to Sunrise
- Lock Screen
- Battery: Turn display off after 10 minutes
Install Scroll Reverser
This is necessary because if you uncheck Mouse > Natural Scrolling that will also reverse the trackpad.
I tried UnnaturalScrollWheels because Scroll Reverser says it will one day be paid, but UnnaturalScrollWheels doesn't reverse magic mice.
Show hidden Finder files
Cmd + Shift + .
Install Karabiner-Elements
I store my Karabiner config in iCloud Drive. Remove the existing config dir at ~/.config/karabiner and then run:
ln -s $HOME/Library/Mobile\ Documents/com~apple~CloudDocs/config/karabiner ~/.config
Follow the instructions on the Karabiner page to set up system permissions.
If using an external keyboard, set up its custom keymappings.
You can get per-device customization in Complex Modifications (e.g., opening a different app on a personal laptop) by using device_if conditions (see the Cmd + 2 modification as an example).
Configure iTerm
This comes bundled with Mac now.
I have uploaded some starter settings for iTerm here. Go to iTerm > Preferences > General > Settings and check "Load preferences from a custom folder or URL" to use this file.
Make iTerm the system default terminal via iTerm2 > Make iTerm2 Default Term.
Note, you will need to install Oh My Zsh and fzf first.
You can also install Powerline/powerlevel10k first to get fancy prompts. Then configure it:
- Disable the git branch name truncation
- Disable listing the number of git stashes in the prompt by editing ~/.p10k.zsh and commenting out the
VCS_STATUS_STASHESline (I couldn't find a cleaner way to customize this).
Install Pastebot
I purchased this from the Mac App Store, so it might be accessible on other devices for free in the future.
Use the hotkey Ctrl + Opt + V.
Install Visual Studio Code
Execute Settings Sync: Turn On... and sign in with GitHub.
To get code to work on the command line, open VS Code and run the command "Install code command in PATH".
- Generate a new SSH key:
cd ~/.ssh && ssh-keygen ssh-add ~/.ssh/id_rsa- Copy the id_rsa.pub contents to my GitHub profile
git config --global user.name "Ben Lind"git config --global user.name "$email"git config --global pull.rebase true(rebase when pulling by default instead of creating merge commits)git config --global push.autoSetupRemote true(no need forgit push -u origin $branchanymore)
Install Homebrew
Download and install the .pkg Mac installer.
Give Homebrew precedence in your PATH via .zshrc:
export PATH="/opt/homebrew/bin:$PATH"
If you get this warning on zsh startup:
compinit:503: no such file or directory: /usr/local/share/zsh/site-functions/_brew
Run brew doctor to clean it up.
If you get Insecure completion-dependent directories detected from oh-my-zsh, see the shell setup README.
These already comes with Mac, but they are slightly older versions and it's nice to be able to update manually.
brew install git zsh bashbrew install trashMy ~/.shell/aliases already has an alias for this.
https://dandavison.github.io/delta/get-started.html
Install Stay
Stay is a window manager that helps with multi-display setups. It will rearrange your open windows according to a config file whenever you connect or disconnect an external monitor.
Install Rectangle
Set up the "almost maximize" configuration:
defaults write com.knollsoft.Rectangle almostMaximizeHeight -float 1
defaults write com.knollsoft.Rectangle almostMaximizeWidth -float 0.8Should be able to export/import the rest of the configs from another computer.
Keyboard shortcuts:
- Left Half: ⌥⌘←
- Right Half: ⌥⌘→
- Center Half: ⌥⌘↓
- Maximize: ⌥⇧⌘F
- Almost Maximize: ⌥⌘↑
- Maximize Height: ⌃⌥⇧↑
- Center: ⌥⇧⌘C
- Next Display: ⌥⇧⌘→
- Previous Display: ⌥⇧⌘←
I used to use Spectacle but it was abandoned sometime before Sep 2021.
brew install ack
Install Alfred
- Disable the Spotlight Cmd + Space shortcut by going to the Spotlight pref pane, clicking Keyboard Shortcuts, and unchecking any associated shortcuts.
- Ignore commas in math by going to Features > Calculator and checking "Ignore thousands grouping separator"
In System Preferences > Keyboard > Keyboard Shortcuts... > App Shortcuts, add the following items:
| App | Menu Item | Shortcut | Notes |
|---|---|---|---|
| Insert Bulleted List | ⇧⌘8 | ||
| Add... | ⌘K | ||
| Save Attachments... | ⇧⌘S | ||
| Send | ⌘⏎ | ||
| Mailbox Search | ⌘F | ||
| Find... | ⌥⌘F | ||
| Mail Help | ⇧˄⌘/ | So that Cmd + Shift + / opens the menu search instead of launching Help | |
| Spotify | Private Session | ⌘P | |
| Preview | Adjust Size... | ⌥⌘I | |
| Google Chrome | Bookmark This Tab... | ⇧⌘D | |
| Calendar | Show Calendar List | ⌘B | |
| Hide Calendar List | ⌘B | ||
| By Day | ⌥⌘1 | ||
| By Week | ⌥⌘2 | ||
| By Month | ⌥⌘3 | ||
| By Year | ⌥⌘4 | ||
| Webex | Start or stop video on a call | ⇧⌘V | |
| Mute or Unmute Yourself | ⇧⌘A | ||
| ChatGPT | Toggle Sidebar | ⌘B | |
| iTerm | Screen | ⇧˄⌥⌘P | So that an accidental ⌘P doesn't trigger Print |
Then under Mission Control, enable the Show Notification Center toggle and assign it the shortcut: ⇧⌥⌘N
These are stored in iCloud Drive > Desktop Wallpapers. Download them and have each display randomly cycle through them.
Save to ~/Downloads:
defaults write com.apple.screencapture location ~/Downloads
Don't show the floating thumbnail (which delays the screenshot actually showing up in ~/Downloads by a few seconds) by hitting Cmd + Shift + 5, clicking Options, and un-checking the floating thumbnail option.
- Backblaze
- Dropbox (for org files)
- Obsidian
- Add a custom icon (iCloud Drive > obsidian icons)
- Glance
- Aliento (for closing notifications with a keyboard shortcut—use ⌘⌥⇧K)
These should be auto-installed via the browser's sync process.
- uBlock Origin Lite
- tabToWindow for moving tabs between windows. Change the "next window" keybinding to Cmd + Shift + S, and remove every other keyboard shortcut.
- Tampermonkey (Chrome & Firefox). Set up settings sync to sync your scripts to Google Drive (I set this up for work but not yet for personal).
- Stylus (Chrome & Firefox). Set up settings sync to sync your scripts to Google Drive (I set this up for work but not yet for personal).
Use these custom key mappings:
# Insert your preferred key mappings here.
# On Mac, "alt-p" actually maps to the pi character
map <a-π> togglePinTab
unmap W
unmap p
unmap P
map <c-f> LinkHints.activateModeToOpenInNewForegroundTab
# Unmap commands that I often accidentally hit
unmap p
unmap `
https://apple.stackexchange.com/questions/259093/can-touch-id-on-mac-authenticate-sudo-in-terminal
nvm install --lts
That should set the LTS version up as the default for you.
nvm install-latest-npm
npm install --global yarn
defaults write com.apple.finder CreateDesktop false && killall Finder
If that fails with Could not write domain com.apple.finder; exiting, then:
su blind-admin
sudo chown -R blind:staff /Users/blind/Library/Preferences/com.apple.finder.plist
Unless you do this, you will only be able to see/send iMessages from the Mac Messages app.
On your iPhone, go go Settings > Messages > Text Message Forwarding. Toggle the new computer on.
touch ~/.hushloginInstall https://github.com/luckman212/screencapture-nag-remover
Here are some things you should make sure to back up before wiping a hard drive:
- TamperMonkey scripts
- Stylus styles
- Home directory dotfiles (e.g., ~/.shell/work)