· 3 min read

Set up mac for dev

Tools, configuration and setup for macos

Intro and contents

I consider myself spoiled not having had to develop on mac (TM) until now. But alas, if a system exists you’ll likely have to deal with it at some point. This post contains almost purely mac-specific settings and tools, it does not contain the usual tools that you would install on any platform (IDE, compilation/transpilation tools, Swiss knife-like terminal tools like curl, vim, tmux etc.) Run commands on this page at your own risk, I do not take responsibility for changes in apps, urls etc.

Asahi Linux (Apple silicon)

If you have a compatible Apple silicon computer, you might want to consider installing Asahi Linux before anything else. Then you won’t have to reinstall the rest of the stuff if you break something. Check device support here.

Apps and tools

Package manager

Homebrew is the most popular package manager for macos, a decent package manager is a must have on any system in my humble opinion.

Pipe directly from curl to install quickly at your own risk:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# follow instructions from installer ...
brew analytics off # to toggle off analytics

Also, Homebrew Bundle might be worth checking out for fresh installs.

Window management

Rectangle is a plain open source app for managing your windows on macos. Very useful if you’re not using a (tiling) window manager such as Yabai.

brew install --cask rectangle

Maniupulate macos apps/interfaces using the keyboard

There are some apps that leverage the accessibility api to manipulate UI programs, that I am aware of:

Have to try one of these sometime.

Launcher/“assistant”

Raycast - Launcher-like tool (with quite a few features), serves the same purpose as apps like alfred, but none of these are open source.

brew install --cask raycast

Other alternatives discussed in this thread

Raycast jira extension (if using jira for work)

For self hosted jira (not cloud). Create api token from jira profile page. https://www.raycast.com/emanguy/jira-search-self-hosted

Clipboard manager/history

Raycast has simple built in clipboard history - open Raycast and type “Clipboard history”. There are other (open source) simple tools for this as well, such as Maccy

Drawing

Paintbrush - macos “paint” equivalent

brew install --cask paintbrush

Status-bar/system monitor

MacOS system monitor in your menu bar installed with:

brew install stats

Having some kind of performance monitor can be incredibly useful.

Other alternatives:

Manage bluetooth devices from the terminal using blueutil

https://formulae.brew.sh/formula/blueutil

brew install blueutil
blueutil -p off # turn off example

Make a script to toggle bluetooth:

#!/bin/sh
if [[ $(blueutil --power) == '0' ]] ; then blueutil --power on ; else blueutil --power off ; fi

Settings

Stop bouncing dock icons

defaults write com.apple.dock no-bouncing -bool TRUE; killall dock

(Semi?) useful tips and tricks

One-liner to flush DNS cache

Can solve some DNS-related issues. sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Reset poower settings if messed up (eg mac won’t go to sleep)

sudo pmset restoredefaults

hotkeys primer

Apple support - Mac keyboard shortcuts

  • Control-F2 or Fn-Control-F2: Move focus to the menu bar.
  • Control-F3 or Fn-Control-F3: Move focus to the Dock.
  • Control-F4 or Fn-Control-F4: Move focus to the active window or next window.
  • Command–Grave accent (`): Switch between the windows of the app you’re using. (You might have to configure this one in the settings)
  • Command-Comma (,): Open preferences for the front app.
  • Control-Command-Q: Immediately lock your screen.
  • Control–Command–Space bar: Show the Character Viewer, (emoji and other symbols)

Deleting files

  • Command-Backspace: Move file to trash
  • Option-Command-Backspace: Delete file permanently

Screenshots

  • Shift-Command-3: Screenshot entire screen
  • Shift-Command-4: Screenshot selected portion of screen
  • Shift-Command-4-spacebar: Screenshot selected window or menu
  • Shift-Command-5: Screenshot or make a screen recording

Accessibility testing

  • Cmd-F5: toggle VoiceOver
  • Cmd-Opt-F5: accessibility shortcuts

Kill applications

  • Cmd-Opt-Shift-Escape: force quit the application in front
  • Cmd-Opt-Esc: Force Quit menu
Back to Blog