Notes

Setting Up a New Mac: Tools and Apps

Daniel Weibel
Created 19 May 2023

This is a checklist for basic apps and tools to install on a new Mac.

See Setting Up a New Mac: Basic Settings for initial actions and settings on a new Mac.

Last used for setting up macOS Ventura 13.4 on MacBook Pro (model A2779).

Install Homebrew

bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

See Homebrew homepage. Also add the brew command to the PATH as explained in the output of above command.

Install Tools and Apps from Brewfile

curl https://raw.githubusercontent.com/weibeld/brewfile/main/Brewfile >Brewfile
brew bundle install --file Brewfile

The weibeld/brewfile repository hosts a Brewfile with a foundational set of tools and apps to be installed on a new Mac. The above command retrieves this Brewfile and installs its content.

Set Bash as the Default Shell

The following sets the Homebrew Bash version as the default shell:

sudo sh -c "echo $(brew --prefix)/bin/bash >>/etc/shells"
chsh -s $(brew --prefix)/bin/bash
sudo chsh -s $(brew --prefix)/bin/bash

The first command above adds the shell to the list of shells that may be used as login shells. The second and third commands set the shell as the default shell for the current user and root, respectively. Further details can be found in the Upgrading Bash on macOS article on Medium.

Note that the Homebrew base directory varies depending on whether macOS runs on Intel or Apple chips (see here):

  • Intel chips: /usr/local
  • Apple chips: /opt/homebrew

The Homebrew base directory can always be queried with brew --prefix.

After doing all of the above, close the current terminal window and open a new one in order to use Bash as the default shell.

Install Dotfiles

curl -Lks http://bit.ly/get-my-dotfiles | bash

The weibeld/dotfiles repository hosts a set of dotfiles (~/.bashrc, ~/.bash_profile, etc.) with customisations for various tools. The above command downloads and installs these dotfiles. Detailed instructions can be found in this gist.

Customise iTerm2

  1. Go to iTerm2 > Settings…> General > Preferences
  2. Check Load preferences from a custom folder or URL
  3. Enter the following URL into the text field:
     https://raw.githubusercontent.com/weibeld/iterm2-settings/main/com.googlecode.iterm2.plist
    
  4. Quit iTerm2 and restart it to apply the customised settings

The weibeld/iterm2-settings repository hosts a complete customised iTerm2 configuration description.

Set Up GitHub Credentials

  1. On GitHub, create a new personal access token
    • Settings > Developer settings > Personal access tokens > Tokens (classic)
  2. Push a commit to any GitHub repository
    • In the appearing prompt, enter your username and the personal access token created above

After this initial authentication, the git-credential-osxkeychain helper saves the credentials in Keychain Access and automatically retrieves them whenever they are needed.

Configure Fluor

Start Fluor, click its icon in the menu bar, and set Trigger to the rightmost option (key). This allows switching mode by simply pressing the fn key.

If you have a globe (🌐) key hosted together with the fn key, make sure to disable the globe key functionality, as explained in Setting Up a New Mac: Basic Settings. Otherwise, the globe functionality may interfer with Fluor.

Set Up Google Drive to Mirror Files

  1. Click on Google Drive in the menu bar, then Preferences > Google Drive > Mirror files
  2. Create and select a folder in which to mirror the Google Drive files
    • This folder will directly contain the content of Google Drive, i.e. no additional top-level folder will be created
    • For example, create and select the folder ~/Desktop/Google Drive

The above settings make sure that the entire content of Google Drive is downloaded to the local machine (in the specified folder) and kept in sync with the server side of Google Drive. By default, Google Drive uses the Streaming mode where files are only downloaded on demand, e.g. when they are opened on the local machine.

Install AdBlock in Chrome

Go to https://chrome.google.com/webstore/detail/adblock-%E2%80%94-best-ad-blocker/gighmmpiobklfepjocnamgkkbiglidom

Set Chrome Download Location to Desktop

Chrome > Settings > Downloads > Location > Change