Mac setup

I’ve used Mac OS for the last seven years. Here are my notes for setting up a new computer.

  • Install Firefox. Sign into sync.
    • In Preferences, General => Language and Appearance => Advanced => set minimum font size to 14 points.
    • To make the tab key only cycle between input forms, not links too, open about:config and add a new entry, accessibility.tabfocus, with value 1 (integer).
  • Install Karabiner Elements.
    • cd ~/.config/karabiner/assets/complex_modifications/ foreach f (~/src/misc/karabiner_elements/*) ln -s $f end
    • Import “Change return to control”.
    • Enable most of those in Karabiner settings.
  • Install 1Password and its browser extension.
  • Install Homebrew.
  • brew install awscli azure-cli bash blueutil colordiff coreutils ffmpeg git gnupg go google-cloud-sdk httpd imagemagick jq librsvg mpg123 node openjdk openssl pandoc php pinentry-mac pstree pwgen python@3.7 python@3.8 rename telnet universal-ctags youtube-dl wdiff wget wp-cli
  • brew tap railwaycat/emacsmacport && brew install emacs-mac --with-emacs-sexy-icon --with-librsvg --with-mac-metal --with-native-compilation --with-starter
    (I used Homebrew’s cask of emacsformacosx.com for a long time, but it suddenly got unusably slow when I upgraded to Emacs 29.1. Switching to emacs-mac and --with-native-compilation fixed that.)
  • If you need Java 8 (eg for databricks-connect):
    • brew install --cask homebrew/cask-versions/temurin8
    • open /usr/local//Caskroom/temurin8/8*/OpenJDK8U-jdk_x64_mac_hotspot_*.pkg
    • # set JAVA_HOME to /Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home
  • gcloud components install beta cloud-datastore-emulator
  • gcloud auth login
  • sudo gem install twurl
  • Update System Preferences:
    • Battery, Options, leave Wake for network access on Only on power adapter? Or Never?
    • Trackpad, check Tap to Click, turn off most gestures
    • Accessibility => Pointer Control => Mouse & Trackpad => Trackpad Options => check Enable dragging => Three finger drag
    • General => Dark mode
    • Sound => uncheck Play UI sound effects
    • Keyboard => repeat speed fastest, delay shortest
    • Mission Control => remove keyboard shortcuts
    • Privacy & Security
    • Lock screen
      • Require password after 1 hour
    • Desktop & screen saver: no screen saver, Hot corners => upper right put display to sleep
    • Sharing => set hostname, enable Remote Login for SSH
    • Displays => Resolution scaled => one step up from default, Night Shift => on, 10p-6a
    • Internet accounts => iCloud, turn off everything except Find My Mac, remove Game Center
    • Bluetooth => Show in menu bar
    • Notifications -> disable Badge app icon for all apps
    • Users => add Karabiner Elements to login items
  • Install WhatsApp. Log in.
  • Install Slack. Log in.
  • Install Dash.
    • Copy ~/etc/dash.5.license to ~/license.dash-license – Dash requires that exact filename – then load it in preferences.
  • Install Google Drive.
    • Make sure I have everything I need off the old computer’s backup in Drive, then delete it.
    • Add folders to sync to Drive: bin books camera_extra docs etc gallery src/snarfed.org. Uncheck the rest.
    • Disable synching Drive to the computer.
  • Install and configure MenuMeters.
  • Install and configure Docker.
  • Install and configure Meet and Enhancement Suite for Chrome.
  • Install the Disable Automatic Gain Control Chrome extension.
  • Pair Bluetooth devices (keyboard, headphones, etc.)
  • mkdir -p ~/src; git clone snarfed/dotfiles; git clone snarfed/misc
  • cd; echo .cshrc .emacs .git_excludes .gitconfig .hgrc .inputrc .pypirc .python .sqliterc .subversion .wgetrc | xargs -n 1 -I %% ln -s src/dotfiles/%%
  • mkdir -p ~/.hammerspoon; cd ~/.hammerspoon; ln -s ~/src/dotfiles/hammerspoon.lua init.lua
  • mkdir -p ~/.config/pip; cd ~/.config/pip; ln -s ~/src/dotfiles/pip.conf
  • Start Hammerspoon.
  • Install the Gmail More Minimalist userstyle in Stylus in Firefox.
  • To remove Firefox’s highlight/glow dot on app tabs with notifications:
    • Open about:config, search for toolkit.legacyUserProfileCustomizations.stylesheets, set it to true.
    • cd 'Library/Application Support/Firefox/profiles/'*.default-release/
    • mkdir -p chrome
    • ln -s ~/src/dotfiles/userChrome.css
  • mkdir -p ~/.ssh; cd ~/.ssh; ln -s ~/src/dotfiles/ssh_config config.
    • Download SSH keys from 1Password, unzip them into ~/.ssh.
  • Set up GnuPG:
    • mkdir -p ~/.gnupg; cd ~/.gnupg; ln -s ~/src/dotfiles/gpg.conf ; ln -s ~/src/dotfiles/gpg.conf
    • Run gpg --list-keys and gpg --list-secret-keys.
    • If they don’t show anything:
      • Run gpg-connect-agent, then keyinfo --list.
      • Check that it shows the keys in ~/.gnupg/private-keys-v1.d.
      • Then run gpg --import ~/.gnupg/pubring.gpg.
  • Add 127.0.0.1 my.dev.com to /etc/hosts.
  • Tell sudo not to require my password by changing this line in /etc/sudoers: %admin ALL = (ALL) ALL to: %admin ALL = (ALL) NOPASSWD: ALL
  • In Emacs:
    • M-x package-list-packages, install dash-at-point ess git-link go-mode helm lua-mode markdown-mode rainbow-delimiters rainbow-identifiers yaml-mode
  • Run ctags on all repos in ~/src.

Leave a Reply

Your email address will not be published. Required fields are marked *