Home

The pragmatic power mac: a modern Primeagen-inspired workflow for Macintosh

It is truly the year of the Linux desktop; LLMs have made troubleshooting Linux a breeze, DHH has brought the common man beautiful Linux with Omarchy, and popular content creators such as PewDiePie, ThePrimeagen, and Linus Tech Tips have made the case for an operating system you control whether for fun or practicality. Furthermore, the Asahi project has come leaps and bounds such that you can daily drive Linux on your Apple Silicon Mac.

But not everyone can make the switch. Many of us require Mac OS despite its many flaws, whether that is for security, because it is your work laptop and you are required to use Mac or Windows, or because there is certain software that is not available or optimal on Linux. I for one develop for the iPhone and need Mac OS to build.

Certain aspects of Mac OS are horrible. The most egregious to me is the operating system attempting to prevent you from running software that Apple has not approved of. Unfortunately, I have no solution for this, for now it is inescapable.

But other aspects are subvertible. I believe it is a common misconception that the operating system is not appropriate for keyboard centric power users. Actually, with a great deal of effort, and thanks to advances in FOSS software such as Aerospace, one can use Mac OS much like The Primeagen uses Arch, or how Omarchy ships with hotkey desktop switching.

This blog post is a record of my developer workflow on Mac in 2026. I hope it proves useful to those who are looking to make Mac OS their own, inspired by the developments in the Linux community. It is the result of a large amount of trial and error, particularly in finding optimal key bindings in order to retain the Mac system keybindings (for copy and pasting, opening browser tabs etc.), allow for i3-like desktop switching, and doing so with optimal ergonomics by not contorting the hand while limited to the magic keyboard.

Elements I present in this workflow include:

It is:

The workflow is heavily inspired by The Primeagen, favouring dedicated desktops and everything available with keyboard shortcuts where possible. Preferring switching multiple programs on one monitor rather than having multiple monitors with a program open on each etc.

This workflow is my own, and I do not present it as the optimal solution. I do however, think it is excellent, simple, and with time will bring a power user an extreme speed-up in navigating the operating system compared to the defaults.

I write this as I say goodbye to the Apple eco-system for now, moving from iOS to Lineage, and Mac OS to Asahi full-time.

Keyboard remap

System rebinds

The CMD key was my biggest problem when moving from Windows and was something I wanted to remedy immediately. Having the CMD key is quite a nice feature of Mac OS in my opinion because things like CTRL-C to exit a terminal program are separated from CMD+C to copy text at a system level. However, it also presented a huge ergonomic problem for me as a home row touch typer, how on earth do I contort my hand in order to hit CMD+[KEY] from resting with my fingers on the home row? I still remember distinctly the day I first switched from Windows to Mac being confounded by this issue and developing pain in my thumb within days. I simply could not believe that most Mac users lived with this, and did not find any consensus on how to overcome it. On Windows you have one fewer modifier key, but the CTRL key is easily reachable with your pinky finger. I guess one way around this is to use the right command key as much as the left one, but this has some problems, for example it's really nice to be able to use to trackpad to select text with your right hand, and simultaneously copy and paste using shortcuts with your left hand. Doing so comfortably is not possible for me using the defaults.

Fortunately, there is a completely spare key on the keyboard just waiting to be rebound, in arguably the most ergonomic position anywhere on the keyboard for a modifier key: caps lock.

Rebind: CAPS_LOCK -> CMD    when *held*.

If you take only one thing from this workflow let it be this. This rebind alone alleviated my thumb pain, sped me up, and made use of a completely unutilised key (note we can separate what CAPS_LOCK does when pressed alone from what it does when held down and used as a modifier e.g. pressing CAPS_LOCK could still perform case change, and holding CAPS_LOCK and pressing another key acts as CMD). We will in fact rebind pressing CAPS_LOCK alone in a moment. CAPS_LOCK is huge and just millimetres away from your pinky finger. Try resting your pinky finger over the CAPS_LOCK key and then notice how every single other key on the keyboard is instantly available without a stretch. You can CMD+T, CMD+W, CMD+TAB your way around the system like a breeze.

But we will not stop there. This rebind is the gateway drug from which we will go on an optimisation spree.

The next system rebind I will argue for is to make typing faster by addressing system wide text editing and text navigation. One of the best pieces of advice I have heard for increasing your typing speed is to avoid pressing the backspace key more than once. Imagine you try to type the word dexterity but you type dxterity. You have a few options:

  1. Hit the backspace key 7 times then retype the word.
  2. Hit the left arrow 7 times and insert e.
  3. Move to the start of the previous word, then move right once, then insert e.
  4. Delete the entire previous word and retype it.

My preference is strongly for option 4. maybe option 3 and never the other two. It's much faster to delete an entire word and retype it than to carefully count the number of keypresses in order to correct it. But how can we delete the previous word on Mac OS? And how could we move the cursor between words? Well again on Windows the defaults are more ergonomic because CTRL+backspace deletes a word, and CTRL+arrows navigates between words. On Mac the default is option and again I find option+backspace difficult if I use my pinky and uncomfortable if I bend my thumb. On Mac CMD+backspace/option deletes an entire line or moves to the start or end of a line.

Fortunately CAPS_LOCK's untapped potential can be exploited again using the following rebind:

Swap CMD and option     when held with arrows or backspace

This solves word navigation and deletion because CAPS_LOCK is performing CMD, so this swap makes CAPS_LOCK+backspace delete the previous word, CAPS_LOCK+arrows navigates between words, CAPS_LOCK+SHIFT+arrows selects text, and function + CAPS_LOCK + backspace deletes the next word.

If we want to delete whole lines or navigate to the start of a line we can do that with option, but I do not do this nearly as often.

With less preamble here are a few more rebinds (note that I use Karabiner-Elements for all of these rebinds, and I have included my full karabiner file so if you have any questions I'd start by reading that or pasting it into an LLM)

Rebind: RETURN -> CTRL      when held

I like to have two CTRL modifiers available, one for my left and one for my right hand. I hit CTRL+C and CTRL+B a lot (in tmux) so having a CTRL modifier for my right hand is more comfortable. I have this setup so pressing return alone still works normally.

One catch worth knowing about: this rebind has to ignore CMD. Because CAPS_LOCK is now performing CMD, a naive RETURN -> CTRL rebind will swallow CMD+RETURN, which plenty of apps use to send.

Another one for my vimmers

Rebind: CAPS_LOCK -> ESCAPE     when pressed

This one makes leaving insert mode in vim fast. It also means we are free to rebind the escape key:

Rebind ESCAPE -> switch desktop        when pressed

If we actually want to perform CAPS_LOCK then I use:

Rebind shift + shift -> CAPS_LOCK

I do this rarely but it is useful from time to time.

We will introduce desktops in a moment but for now I'll just say that switching between them with the escape key is fast, it's easy to hit, and even though it's a bit of a stretch, that's okay because you don't do it mid-sentence / as part of a vim command sequence. There's something quite satisfying about punching escape to snap between desktops.

Aerospace

Aerospace is a FOSS i3-like window manager for Mac OS. It is fully configured with dotfiles, and can do most of what I want from a window manager. My workflow is to have numbered workspaces for projects and lettered workspaces for singleton programs. The whole thing relies on two keybinds:

Keybind: CMD + [key] to switch to a desktop associated with [key]
Keybind: CMD + shift + [key] to send a program to desktop associated with [key]

Note:

CMD is my Aerospace leader key

We got rid of all of the other uses of the left and right CMD keys so they are now free to be rebound for this purpose.

I have a desktop called browser that's where my browser lives, and I can hit CMD+b to switch to that desktop. I always have a terminal open on a desktop called terminal and likewise I can switch to that with CMD+t. My projects vary from day to day. If I am working on a data science project and want to have a browser open to view a code notebook in a split view with the code on the left, then I can switch to browser with CMD+b then open a new window with CMD+n then send that new window to desktop 1 with CMD+shift+1. I can then switch to the terminal with CMD+t, open a new terminal window with CMD+n and then send that to project 1 with CMD+shift+1. This sounds complicated but you quite quickly get the hang of it, and I generally do not find myself opening and closing programs that often, I will set up a project desktop and more or less keep them there until I restart the laptop. There are ways to make aerospace automatically start and assign programs but I had some problems with a very slow system start and some flakiness. Aerospace will auto-snap my windows to be full screen or split pane if I hit CMD+f to toggle between floating and tiling mode.

I have three different keys for switching between the current desktop and the most recent other desktop: pressing escape, or pressing either CMD key. The redundancy is there because I had no other use for pressing the CMD key and sometimes it's nice e.g. if you hit CMD+[key] to change desktop but regret it you can almost go back by hitting CMD.

There are some things I have not ironed out with this setup, the biggest is that I cannot get program focus switching to work. I really want to be able to hit CMD+arrows to focus programs within a desktop but this did not work for me initially and I have since created other habits, it may already be fixed in an update.

Here is my full aerospace config:

# https://nikitabobko.github.io/AeroSpace/guide#default-config

start-at-login = true

[mode.main.binding]
# Switch workspace with ctrl+alt+number
ctrl-alt-1 = "workspace 1"
ctrl-alt-2 = "workspace 2"
ctrl-alt-3 = "workspace 3"
ctrl-alt-4 = "workspace 4"
ctrl-alt-5 = "workspace 5"
ctrl-alt-6 = "workspace 6"
ctrl-alt-7 = "workspace 7"
ctrl-alt-8 = "workspace 8"
ctrl-alt-9 = "workspace 9"
ctrl-alt-0 = "workspace 0"

# Move workspace with ctrl+alt+shift+number
ctrl-alt-shift-1 = "move-node-to-workspace 1"
ctrl-alt-shift-2 = "move-node-to-workspace 2"
ctrl-alt-shift-3 = "move-node-to-workspace 3"
ctrl-alt-shift-4 = "move-node-to-workspace 4"
ctrl-alt-shift-5 = "move-node-to-workspace 5"
ctrl-alt-shift-6 = "move-node-to-workspace 6"
ctrl-alt-shift-7 = "move-node-to-workspace 7"
ctrl-alt-shift-8 = "move-node-to-workspace 8"
ctrl-alt-shift-9 = "move-node-to-workspace 9"
ctrl-alt-shift-0 = "move-node-to-workspace 0"

# Switch to app-specific workspace.
ctrl-alt-a = "workspace ai" # e.g. Claude or a browser with an AI site open
ctrl-alt-b = "workspace browser"
ctrl-alt-c = "workspace calendar"
ctrl-alt-g = "workspace google"
ctrl-alt-m = "workspace mail"
ctrl-alt-o = "workspace obsidian"
ctrl-alt-p = "workspace pdf-reader" # these days I just use my browser as a pdf reader
ctrl-alt-r = "workspace repitition(anki)"
ctrl-alt-s = "workspace spotify"
ctrl-alt-t = "workspace terminal"
ctrl-alt-w = "workspace whatsapp"
ctrl-alt-z = "workspace zotero"

# Move app to app-specific workspace.
ctrl-alt-shift-a = "move-node-to-workspace ai"
ctrl-alt-shift-b = "move-node-to-workspace browser"
ctrl-alt-shift-c = "move-node-to-workspace calendar"
ctrl-alt-shift-g = "move-node-to-workspace google" # Google account sandboxed browser
ctrl-alt-shift-m = "move-node-to-workspace mail"
ctrl-alt-shift-o = "move-node-to-workspace obsidian"
ctrl-alt-shift-p = "move-node-to-workspace pdf-reader"
ctrl-alt-shift-r = "move-node-to-workspace repitition(anki)"
ctrl-alt-shift-s = "move-node-to-workspace spotify"
ctrl-alt-shift-t = "move-node-to-workspace terminal"
ctrl-alt-shift-w = "move-node-to-workspace whatsapp"
ctrl-alt-shift-z = "move-node-to-workspace zotero"

# Focus finder (e for file explorer)
ctrl-alt-e = "exec-and-forget open -a Finder"

# Move focus between windows.
# This isn't working :( using hjkl works but not for ghostty which eats those keys.
ctrl-alt-left = 'focus left'
ctrl-alt-down = 'focus down'
ctrl-alt-up = 'focus up'
ctrl-alt-right = 'focus right'

alt-tab = "workspace-back-and-forth"

# Toggle floating window.
ctrl-alt-f = "layout floating tiling"


# Workaround: Ghostty must be started in tiling mode in order to not experience
# bug whereby opening a terminal tab makes aerospace think you've opened a new window.
[[on-window-detected]]
if.app-id = "com.mitchellh.ghostty"
run = ["layout floating"]

# Floating by default.
[[on-window-detected]]
check-further-callbacks = true
run = 'layout floating'

Tmux, code editors, AI

Sometimes I code and interact with Claude Code on my terminal desktop and switch between this and say, a web app which would be running on the browser desktop. Or if I am purely in the terminal then I could do all that on terminal. Other things have their own desktop. Regardless I almost always use a custom command called aliased tmuxd which starts tmux in the current directory and creates 4 tabs with vim opened in the first, command line in the second and claude code in the third. These are numbered 1-4 so I can easily switch to them with CTRL-b + [number] or switch between a pair of them with CTRL + ;, or cycle through them with vim style motions: CTRL+l to move up a number, CTRL+h to move down a number.

Tips:

I might come back to this and expand on it another day, not onto Asahi full time!

Written 25 September 2026