Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

New OS X Computer Setup

Below are the programs I install, the Preferences I change, and the configurations I tweak after doing a fresh install of macOS.

Homebrew / Cask

http://brew.sh/

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew tap caskroom/cask
$ brew tap caskroom/versions
$ brew tap caskroom/fonts
$ brew tap tldr-pages/tldr

Rearrage PATHs

This is so that Homebrew-installed tools load instead of built-in ones. git, emacs, etc.

$ sudo vi /etc/paths

Put /usr/local/bin above /usr/bin in the list. Save file and restart terminal.

Install with Cask

$ brew cask install alfred                # https://www.alfredapp.com/
$ brew cask install flux                  # https://justgetflux.com/
$ brew cask install font-fira-code        # https://github.com/tonsky/FiraCode
$ brew cask install font-source-code-pro  # https://github.com/adobe-fonts/source-code-pro
$ brew cask install google-chrome         # https://www.google.com/chrome/browser/desktop/
$ brew cask install iterm2-nightly        # http://iterm2.com/
$ brew cask install java                  # https://java.com/en/download/
$ brew cask install keepingyouawake       # https://github.com/newmarcel/KeepingYouAwake
$ brew cask install licecap               # http://www.cockos.com/licecap/
$ brew cask install lunchy                # https://github.com/eddiezane/lunchy
$ brew cask install middleclick           # http://rouge41.com/labs/
$ brew cask install osxfuse               # https://osxfuse.github.io/
$ brew cask install spectacle             # https://www.spectacleapp.com/
$ brew cask install tunnelblick           # https://www.tunnelblick.net/

Install with Homebrew

$ brew install aspell                     # http://aspell.net/
$ brew install bash-completion            # https://github.com/scop/bash-completion
$ brew install git                        # https://git-scm.com/
$ brew install gnupg2                     # https://www.gnupg.org/
$ brew install homebrew/fuse/sshfs        # https://github.com/libfuse/sshfs
$ brew install htop                       # http://hisham.hm/htop/
$ brew install jq                         # https://stedolan.github.io/jq/
$ brew install leiningen                  # http://leiningen.org/
$ brew install markdown                   # http://daringfireball.net/projects/markdown/
$ brew install pandoc                     # http://pandoc.org/
$ brew install shellcheck                 # https://www.shellcheck.net/
$ brew install task                       # http://taskwarrior.org/
$ brew install the_platinum_searcher      # https://github.com/monochromegane/the_platinum_searcher
$ brew install tldr                       # http://tldr-pages.github.io/
$ brew install trash                      # http://hasseg.org/trash/
$ brew install tree                       # https://en.wikipedia.org/wiki/Tree_(Unix)

launchctl / lunchy

build locate database:

$ lunchy install /System/Library/LaunchDaemons/com.apple.locate.plist
$ lunchy start com.apple.locate.plist

Create plist to periodically run brew update (replace <username> below):

  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  <plist version="1.0">
  <dict>
      <key>Label</key>
      <string>com.<username>.brew-update</string>
      <key>ProgramArguments</key>
      <array>
          <string>/usr/local/bin/brew</string>
          <string>update</string>
      </array>
      <key>StartCalendarInterval</key>
      <dict>
        <key>Hour</key>
        <integer>2</integer>
        <key>Minute</key>
        <integer>0</integer>
      </dict>
      <key>RunAtLoad</key>
      <true />
  </dict>
  </plist>

And start it:

$ lunchy start ~/Library/LaunchAgents/com.<username>.brew-update.plist

Git configuration

$ git config --global user.name '<your-proper-name>'
$ git config --global user.email <email-address>
$ git config --global core.editor 'vim' # or whatever editor you like

Spacemacs

http://spacemacs.org/

First install the recommended version of Emacs

$ brew tap d12frosted/emacs-plus
$ brew install emacs-plus
$ brew linkapps emacs-plus
$ git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
# the next two commands install my .spacemacs file--you might not want that
$ git clone https://github.com/bi1yeu/dotfiles
$ cd ~/dotfiles/ && ./link-dotfiles.sh

Bash prompt

$ brew install bash-git-prompt

Add to .bash_profile:

if [ -f "$(brew --prefix)/opt/bash-git-prompt/share/gitprompt.sh" ]; then
    source "$(brew --prefix)/opt/bash-git-prompt/share/gitprompt.sh"
fi

GIT_PROMPT_ONLY_IN_REPO=1

Link Google Account to iCal

Prefs

  • Map Caps Lock key to Control modifier in Keyboard prefs
  • Adjust key repeat in Keyboard prefs
  • Enable Remote Login in Sharing prefs
  • Prevent computer from sleeping automatically when the display is off in Energy Saver prefs
  • Put display to sleep in Mission Control > Hot Corners prefs

Generate SSH key and add it to ssh-agent

$ ssh-keygen -t rsa -b 4096 -C "<email-address>"
$ chmod 700 ~/.ssh && chmod 600 ~/.ssh/*
$ eval "$(ssh-agent -s)"
$ ssh-add ~/.ssh/id_rsa

Edit iTerm2 settings to bind alt+arrow keys to move forward/backward

https://coderwall.com/p/h6yfda/use-and-to-jump-forwards-backwards-words-in-iterm-2-on-os-x

@teomaragakis

This comment has been minimized.

Copy link

@teomaragakis teomaragakis commented Aug 30, 2016

Thanks! This helped me find a couple of great apps I did not know of.

@bi1yeu

This comment has been minimized.

Copy link
Owner Author

@bi1yeu bi1yeu commented Dec 29, 2017

I made a script to do a lot of this: https://github.com/bi1yeu/new-macos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment