I just got a new Macbook, and I thought it would be useful for my future self to write down what I installed on it. Luckily the history file in my shell is long enough to remember everything.

The order of the steps is quite random.

1. Install Homebrew

I hear there are other alternatives out there, but I stick to Brew for now.

I installed Brew the “official” way:

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

This seemed to automatically install the XCode Command Line Tools.

Follow the install instructions (this adds a init script to my .zprofile file):

(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/fredrikmeyer/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

2. Install Clojure

This installs Clojure and OpenJDK 21. From the official Clojure documentation.

brew install clojure/tools/clojure
brew tap homebrew/cask-versions
brew install --cask temurin21
brew install leiningen

I do my Clojure programming in Emacs with Cider and clojure-lsp.

3. Install Emacs

I use this version of Emacs on Mac.

Install with:

brew install emacs-plus@30 --with-ctags --with-xwidgets --with-imagemagick --with-native-comp --with-poll
osascript -e 'tell application "Finder" to make alias file to posix file "/opt/homebrew/opt/emacs-plus@30/Emacs.app" at POSIX file "/Applications"'

The second line makes it possible to open Emacs with Finder.

My Emacs configuration is stored here. since I don’t install on a new machine very often, usually I have to restart Emacs a few times before it works.

4. Install tmux

brew install tmux

I use Tmux to manage windows in my Terminal.

My Tmux configuration is Git managed. Here is the current version:

# See this https://www.seanh.cc/2020/12/27/copy-and-paste-in-tmux/
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'

set -g mouse on

bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"

run '~/.tmux/plugins/tpm/tpm'

This first requires install the Tmux plugin manager. The package tmux-yank makes copy on select work as expected. I wrote about how I use Tmux here.

5. Install oh-my-zsh

Mostly by habit I use oh-my-zsh for terminal configuration. I’m mostly happy with the default configuration.

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

6. Install node

I do a lot of frontend development, so I will probably need to install more Node related packages, but I needed Node to let Emacs install LSP clients automatically (many of them are stored on NPM).

brew install node

7. Install jotta-cli

I do a lot of my backup using Jottacloud. They have a CLI utility to select directories to backup.

brew tap jotta/cli
brew install jotta-cli
brew services start jotta-cli
jotta-cli login

8. Install Rust

From the official documentation:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"  # Add this line to .zshenv

For editor integration, also add the language server:

rustup component add rust-analyzer

9. Install Rectangle

I was looking for a good window manager for Mac. Spectacle is not maintained anymore (I do think it works still), but after some searching, I found Rectangle. Open source and easy to use.

brew install --cask rectangle

I mostly use ctrl+option+return to maximize windows and ctrl+option+←/ctrl+option+→ to move windows to the left/right half.

10. Install GNU Stow

I use GNU Stow to manage (some of) my dotfiles. A good intro is here.

brew install stow

I keep the dotfiles in a private repository (maybe I make it public one day).

11. Command line utilities

I use bat sometimes to read code files with syntax highlighting in the browser.

And ripgrep for fast search (also makes some Emacs plugins faster).

brew install bat
brew install rg

Setup Git

Remember to update the Git config. At the moment mine looks like this:

[user]
	name = Fredrik Meyer
	email = hrmeyer@gmail.com

[core]
	editor = emacs

[github]
	user = FredrikMeyer

[init]
	defaultBranch = main

12. Install Ruby

This blog is built using Jekyll, so it needs Ruby installed.

It also uses (at the moment) an old version of Ruby, so I installed Ruby 2.7.3 with a version manager:

brew install rbenv ruby-build
rbenv init
source ~/.zshrc
rbenv install --list-all
rbenv install 2.7.3

13. Apps installed other ways

That seems to be all (for now) that is installed via the CLI. I have usually also always install iTerm2, but I noticed I don’t use many of its features (tabs, themes, etc?), so for now I’m sticking with the builtin Terminal app.

Google Chrome

It’s easy and it stores all my passwords.

Slack

For the interruptions.

Dropbox

All my files.

NordVPN

Sometimes I need a VPN.

Spotify

What’s life without music? (silent)

Amazon Prime Video

The app allows downloading series.

Remarkable Desktop App

I have the Remarkable tablet, and I often use the app to upload PDF’s.

Steam

Sometimes I play games. Unfortunately, many games don’t work anymore on Mac - and I might be too lazy to try installing Windows on it.