Skip to content

Instantly share code, notes, and snippets.

@vdt
Forked from stig/New Mac Setup.org
Created January 12, 2016 06:08
Show Gist options
  • Select an option

  • Save vdt/ecd369c3642c6ec249b5 to your computer and use it in GitHub Desktop.

Select an option

Save vdt/ecd369c3642c6ec249b5 to your computer and use it in GitHub Desktop.
SETUP of new machine

How I set up a new Mac

Install Apps

First I install some apps. I try to use the AppStore for everything if I can, buth unfortunately that’s not possible. YMMV.

AppStore

  • Slack
  • Tweetbot
  • CopyClip 2
  • Xcode
  • Fantastical 2

From other sources

Configure System Preferences

While installs are running I update preferences. (I try to manage with as few changes from the defaults as possible, to make my life simpler.)

Terminal

  1. Mark Novel the default profile
  2. Text tab:
    • Set default text size 14pt
    • Set the font to Menlo
  3. Shell tab: change “When the shell exits” drop-down to “Close if shell exited cleanly”
  4. Keyboard tab: tick “Use Option as Meta key”

System Preferences

Keyboard

  1. Shortcuts tab:
    • Change “Press Tab to move keyboard focus between” to “All controls”
    • Under “Mission Control” turn off the ^ <- and ^ -> shortcuts for “Move left a space” and “Move right a space”

Input Sources

  • Tick “Show Input menu in menu bar”
  • Add Dvorak input source

Date & Time

  1. Date & Time tab: Use time.euro.apple.com
  2. Clock tab: Tick “Show the day of the week”

Configure Applications

Configure SSH

If I can, I copy the entire ~/.ssh directory from the previous/other machine. If not, I have to additionally add the key to my GitHub account.

Configure Emacs

git clone [email protected]:stig/.emacs.d.git

At this point I can launch Emacs using its full path: /Applications/Emacs.app/MacOS/Emacs. My .emacs.d/init.el should install all required (and some optional) packages automatically.

Note: once this is done I can open this file from a gist by typing C-x g l. From there on in I do the rest of the setup by executing the code snippets directly from this buffer using Org Babel. Place the cursor over any shell example and hit C-c C-c to try it.

For some reason Emacs’ ansi-term mode displays some “weird characters”. To fix this, copy ansi-term.ti to somewhere locally and run tic on it to create .terminfo:

curl 'https://gist.github.com/stig/0c8bc5aeb8602cdb45de#file-ansi-term-ti' > /tmp/ansi-term.ti
tic -o ~/.terminfo /tmp/ansi-term.ti

Configure ZSH

Install Oh-My-ZSH:

git clone git://github.com/robbyrussell/oh-my-zsh.git .oh-my-zsh

Install my .zshrc (backing up any existing one, if present):

git clone [email protected]:stig/.zsh.d.git
cp ~/.zshrc ~/.zshrc.orig
ln -s .zsh.d/.zshrc

Set Zsh as my shell:

chsh -s /bin/zsh

Install Homebrew & install apps

Install Homebrew into $HOME:

mkdir -p .homebrew
curl -L https://github.com/Homebrew/homebrew/tarball/master | tar xz --strip 1 -C .homebrew

Now update brew:

brew update

Apps used by Emacs

brew install the_silver_searcher trash editorconfig multimarkdown

Until recently I relied heavily on multimarkdown for preview in markdown-mode, but I have moved to use org-mode by default instead now.

brew install aspell --with-lang-uk

Cluster SSH

This requires a bit of hackery until my patch to make csshx behave in Zsh is merged.

brew edit csshx

Now, replace the head link with:

https://github.com/stig/csshx.git

Then install with:

brew install csshx --HEAD

Write config files:

touch ~/.clusters
test -f ~/.csshxrc && mv ~/.csshxrc{,.orig}
echo 'extra_cluster_file=~/.clusters' > ~/.csshxrc

GraphViz

Note: A full Xcode installation is required.

brew install graphviz --with-app
sudo brew linkapps graphviz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment