My Developer Setup on MacOS
I’ve been a Windows user for most of my life but switched to Linux when I delved into development. Eventually, I got my hands on the MacBook Pro M1 (2021). While it’s a fantastic computer with outstanding performance and battery life, recreating my familiar Linux development environment turned out to be more challenging than expected.
In this article, I aim to share my ongoing journey of transforming a macOS machine into a true development powerhouse. Join me as I navigate through the adjustments, tweaks, and setups that have helped me tailor this device to suit my development needs.
macOS System Settings
One of macOS’s most prominent features is its sleek design, which most people, myself included, appreciate for its aesthetics.
However, what matters even more to me is responsiveness, performance, and a clutter-free environment that allows me to stay focused and productive. To achieve this, I apply a couple of tweaks to macOS System Settings that suit my needs best.
Maximizing Screen Real Estate
I’ve noticed that I barely ever use the Dock. I launch my apps using Spotlight or hotkeys instead. That is an opportunity to free up some space on the screen.
One of the first solutions is to reduce it’s size in the settings:
System Settings > Desktop & Dock > Size (move the slider until you’re satisfied)
…but I go a step further and place it on the right of the screen and enable the setting to automatically hide it:
System Settings > Desktop & Dock > Position on screen: right
System Settings > Desktop & Dock > Automatically hide and show the Dock ✅
That way it never gets in the way when I don’t need it and if I do need it, all I need to do is hover the pointer over the right edge of the screen, and it slides out.
Turning Off Animations
I use keyboard shortcuts to move between workspaces and I’ve found that enabling the Reduce Motion setting really helps with making the transitions instantaneous.
System Settings > Accessibility > Display > Reduce motion ✅
What really happens when you enable it is all of those beautiful macOS transitions are turned off. I much prefer it this way.
Seriously, give it a try.
Finder Settings
In all honesty, I find the default Finder experience quite underwhelming. I dare say, I’d actually prefer File Explorer over it.
But hey, no worries! With just a few simple tweaks, we can turn it into a much more usable tool. Let’s dive in and customize it to our liking.
Default Finder Window
By default, whenever you open a new Finder window it shows you your recently opened files. What I’ve found is that when I open Finder I’m instead looking for some specific location on my hard drive.
Instead, in my view, it makes more sense to start with your home directory.
Finder Settings > General > New Finder windows show: {your home dir}
Remove Tags
I personally don’t use them, so I don’t want them to pollute the sidebar.
Finder Settings > Tags > select and ’-’ to remove each tag
Remove Airdrop
I’ve never used it, and I probably won’t.
Finder Settings > Sidebar > Airdrop ❌
Here you can also select any favorite locations you want to appear on the sidebar.
Show File Extensions
I want to be able to see exactly what file extension I’m dealing with when opening a directory so enable this too.
Finder Settings > Advanced > Show all filename extensions ✅
Show Path
I feel like it should be enabled by default, but if you want to be able to see where you are on your hard drive, you may want to enable this option:
Finder > View > Show Path Bar
Homebrew Package Manager
One thing you never miss when switching from Windows to Linux is not having a package manager. Its just so convenient to have one central place for downloading and updating all (ok, almost all) of the software on your machine.
Luckily, macOS has something to offer here. brew is the most popular package manager on macOS and it was an easy choice.
Install brew on your machine by pasting this command in your shell:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Then, installing anything is as easy as:
brew install --cask firefox
Use the
--cask
flag when installing desktop applications like Firefox or Discord. Otherwise simply runbrew install {name}
To check whether the app you’re looking for is available in brew I usually just google something like {application name} brew
.
Upgrade your cli-tools with:
brew upgrade
Upgrade your GUI apps with:
brew upgrade --cask
Some casks don’t have versioning information and some of them have a buil-in upgrade mechanism (e.g. Chrome), in that case you may need to run the upgrade with a
--greedy
flag.
Besides apps and cli utilities, brew can also be used to install fonts, which I think is a much more convenient way to do that.
Installing Node
I use brew to install almost all of my software, but there is one exception - yes, I’m talking about NodeJS. If you want to avoid countless permission errors, then perhaps you may be interested in using a version manager for NodeJS .
Two of the most popular ones are nvm and fnm. I use the latter because its faster.
Install it with a bash script:
curl -fsSL https://fnm.vercel.app/install | bash
After that, the usage is as simple as:
# install the latest node version
fnm install
# install the latest node lts version
fnm install --lts
# use a specific node version
fnm use {version}
Terminal
I currently switch between iTerm2 and kitty. I like how snappy kitty is, but sometimes it gives me some weird graphical artifacts when running neovim
in tmux
. I don’t use almost any of the bells and whistles of kitty, so for me the transition between the two is easy.
Both can be installed with brew.
Install iTerm2:
brew install --cask iterm2
Install kitty:
brew install --cask kitty
Shell
zsh
is the default shell on modern versions of macOS and I see no reason to switch to something else.
In general I try to keep things as minimal as possible when it comes to customization. For this reason I avoid Oh My Zsh, which is a very popular configuration manager for zsh
.
Pros: simple configuration
Cons: comes bundled with a bunch of stuff you’ll probably never use, which can slow down starting time
zap + p10k
My current setup consists of two pieces:
Both prioritize speed and simplicity and work very well together.
I have very few zsh
plugins installed and I can manage them by adding or removing a single line in my .zshrc
.
Window Management
This is a polarizing topic, but I personally prefer tiling window managers to floating windows. I haven’t used floating windows since the Windows days and I don’t want to go back. I also try to use my mouse (touchpad) as little as possible to avoid excessive context switching and be blazingly fast.
Yes, I do know that you can tile windows to left and right in macOS natively, but:
- Its manual
- At most you can have two windows tiled next to each other
yabai
That’s where yabai comes in. Yabai is a tilling window manager based on binary space partitioning, which means that every time you open a new window it doesn’t put it on top of the previous one, but splits the space previously occupied by a single window in two and places it next to the previous one in a recursive manner.
Perhaps it’ll make more sense visually.
skhd
But having your window manager be able to do this kind of thing is not enough, you need to be able to trigger some commands to control these windows, move them around, resize them or even move them from one workspace to another.
skhd a simple hotkey daemon for macOS created by the developer of yabai is exactly the tool we need. I mostly just use the example config, but you can extend it to your liking and set hotkeys to launch desired apps.
I have cmd - return
hotkey set to open my terminal. Here’s what it looks like in my .skhdrc
:
cmd - return : /Applications/kitty.app/Contents/MacOS/kitty --single-instance -d ~
My setup is quite simple. I have four workspaces, each dedicated to a particular task (e.g. workspace1: web, workspace2: code).
Typically, I have only one window open per workspace, occasionally having two windows side by side. Rarely, I may have more than two windows on a single workspace, but I find comfort in knowing exactly where each newly opened window belongs. This setup allows me to stay organized and focused on the task at hand.
Spaceman
Because I like to assign each workspace a particular role, knowing which workspace I’m on currently is very helpful. macOs surprisingly doesn’t have this feature, but I have found a tool that helps with just that.
The only thing Spaceman does is it shows which workspace is currently active and it does it ok. It hasn’t been updated in several years and I’ve seen quite a few bugs like named workspace indicators resetting their names back to default, but I switched to numbers as indicators and its been working great.
Here’s what it looks like: