Not learning macOS
Four years ago I got my first corporate MacBook and wrote Learning MacOS, a list of the things a Mac did that surprised me, on the assumption that I’d get used to them.
It turns out I’m an old curmudgeon who has already learned how to use computers and I can’t or won’t do it again - I still assume everything is Gnome, and I keep being surprised by macOS.
So I’ve given up learning macOS and tried to bend it to suit my expectations instead; gnomic-mac makes a Mac behave enough like Gnome that my muscle memory works, with a replacement work MacBook as the trigger for encoding and automating this.
What it does
It doesn’t try to make macOS look like Gnome, just make my muscle-memory key-bashing less likely to do the wrong thing:
- Tap Super on its own to search, and move the mouse into the top-left corner for the overview.
- Super+arrows snap and maximise windows, Super+Shift+arrows move them to other displays, Super+L locks the screen.
- Alt+Tab switches windows rather than apps, and Alt+F4 closes them.
- Desktops are on Ctrl+Alt+arrows.
- Ctrl+arrows jump by word and Home/End go to the ends of the line, at least in native Mac apps.
- Screenshots go to a file and the clipboard, which macOS won’t do by itself.
- Most importantly, alt+. works in the shell!
It leaves Cmd+C and Cmd+V alone; I do still wish Gnome3 had taken the opportunity to add Super+C and Super+V to avoid conflicts with ctrl-C in shells.
Super is Option
Super is whichever key is where the Windows key would be, next to Ctrl. On the built-in keyboard that’s Option, not Cmd.
I spent a good while assuming Cmd was Super (they are similar in behaviour), and most of my confusion came from that.
Cmd is how every Mac app does its shortcuts, so remapping it means replacing all of them, which is unlikely to be possible completely universally.
Perhaps importantly, this is set up for Logitech keyboards; I have an MX Mechanical Mini.
Three layers
It’s split up so that it might be useful to someone who isn’t me:
gnomeis the Gnome behaviour.pc-keyboardputs Ctrl, Super and Alt where a PC keyboard has them, on the MacBook’s own keyboard and on a PC keyboard in Mac mode.personalis my apps, file associations, Caps Lock as Escape, a webcam fix for UK lighting, and so on. Probably not needed for you, but maybe useful?
The drop-down terminal lives in there too. Currently this is iTerm2, but it was Tabby for a bit. Neither’s as good as Guake or DDTerm, but I periodically get annoyed with one or the other and switch back.
How it got built
This began with asking Claude to try to make alt+. reliable in a shell in macOS, which led to a rule that occasionally broke my alt-tab preferences. So I decided to just keep throwing problems at Claude for a bit and then try to rationalise it.
This is the output of that, essentially - trying to optimise for using fewer, simpler, more-stable tools over the macOS habit of one tool for each problem.
Those tools are Karabiner to intercept and modify keypresses, Hammerspoon to interact with the accessibility API to manipulate windows and desktops, and AltTab for AltTabbing.
The catches
It needs admin rights, and permission for Hammerspoon and Karabiner to watch the keyboard. So far, it seems pretty standard for corp macs to have admin rights for their users, so this should be okay?
macOS doesn’t let you do everything Gnome does - there is no ‘send this window to that virtual desktop’ hook in macOS, there’s no way to just not have macOS’ weird fullscreen behaviour, and always-on-top is too bodgy even for me, for examples.
Sad Mac image by Erik.huemer, CC BY-SA 4.0.