MacOS from the perspective of a Linux user
After my last blog post I made the brazen decision to buy a 13” Macbook Pro. This was in retrospect, an incredibly stupid decision; It’s a pretty large purchase in my book. I decided to write this post both to justify the decision to myself, but also to put to (metaphorical) paper my thoughts and the interesting things I noted after making the switch.
The Interface
It’s no suprise to anyone that MacOS is gorgeous. The closest Linux has is KDE, which nails the look but not the UX. MacOS has this nice middle ground between KDE and GNOME.
What I mean by this is that KDE is gorgeous, but building the interface is up to you. As a result of this, alot of things feel disconnected. KDE suffers this alot, where it has a million options and features but most don’t really feel as polished or consistent. GNOME on the other hand has much more consistency. When on Wayland you get gestures that all feel natural and the desktop has a sort of “flow” to it when you use it.
MacOS has the beauty of KDE and the consistency of GNOME, but it does each a little better. The gestures are incredibly natural and comprehensive, and most things work pretty perfectly.
Keybindings
This one is a mixed bag for me. As a Linux user, I’ve basically used a Windows keyboard for my entire life. Switching to the Mac keyboard on it’s own is it’s own learning curve. Throw in the alien keybindings and I’ve now got 2 different things to get used to. This is something I’m sure will come more naturally with time, but it’s still going to be a task.
First things first, Super and Meta are swapped. This has been the single most annoying problem I’ve had in general usage. When using Emacs in particular all my muscle memory is a little wrong and I’m constantly making mistakes. However, it’s not juse Emacs; simple actions like copy and paste are different as they don’t use Control, they use Command. In fact, I’m still struggling to get used to the separation of Command and Control. I think I get the general idea with Command issuing commands and control usually being responsible for things like navigation, but it’s another thing to get used to.
As I mentioned earlier, there’s 1 huge feature for me which is that there’s loads of Emacs keybindings all over the OS.
- Control + A/E jumps to the start/end of the line/entry
- Control + K deletes the rest of the line
- Control + P/N moves up or down a line
- Control + F/B moves the cursor forwards/backwardpps
I still have a number of keybindings to learn, and some make more sense than others (screenshot is ⇧⌘3 or ⇧⌘4 for screenshot region???), but having Emacs keys does make this a little easier.
Emacs on MacOS is awkward
I know that one of the first thing any developer should do when setting up a Mac is to install homebrew. After installing homebrew I install the other critical application, Emacs!
First thing I noticed, the (let’s be honest, useless) toolbar integrates with the window controls like most other MacOS apps. Nice! Although I immediately disable this because tool-bar-mode is useless.
Unfortunately Emacs on MacOS isn’t simply install and run, a few things are broken. First, all the icons are janky. I found out that there’s a non-interactive function you can call with M-: (all-the-icons-install-fonts). Thankfully, I remembered this function exists already so just checked it was installed and called it with M-x and my problems were solved.
Next, accessing your Document’s does not work. You can press ⌘O gives you a file dialog that does let you access your Documents folder, but C-x C-f does not show any files inside your Documents. It turns out, to fix this you need to give full file system access to both Emacs and /usr/bin/ruby? I don’t know why it works, but it does work.
Overall, the experience has had a couple of inconveniences, but after solving these problems it works pretty well. System keybindings do not work at all when viewing an Emacs window, so you cannot switch workspaces with the keyboard or use that lovely ⇧⌘/ keybinding I mentioned earlier. I haven’t set up mu4e, and probably will not; Mail is already pretty nice and enough for my meager mail needs, plus it syncs well enough across devices. Setting up LSP language servers was a little annoying, as just using M-x lsp-install-servers doesn’t seem to play nice. However, installing the LSP server manually through pip (for python-lsp-server[all]), activating that environment with conda, and selecting the server with +lsp/switch-client seems to work perfectly fine. Perhaps with some clever .dir-locals.el trickery I could automate this, but I’m not super confident using .dir-locals.el to do that sort of thing. I just have to set it up once per session. For now, it’s good enough.
There’s also Mitsuharu Emacs. This is a well updated fork of Emacs (at time of writing, 27.2) with a few extra MacOS tweaks to make everything feel a little nicer. However, even this fork is not without it’s problems. The biggest issue I have with it is that it overwrites the tab-bar keybindings to use MacOS native tabs. This should actually be a good thing! Native MacOS tabs are nice. They’re a little larger than tab-bar-mode’s tabs, but they allow you to separate tabs into their own windows and back again. However, this functionality does not seem to work for me. C-<tab> will show the tab-bar along with a plus button to create a new tab, but pressing this would simply create a new frame. I once managed some strange elisp incantation to make it work, but I only wrote down the command I thought fixed it which turns out was not enough.
After writing that sentence, I spent half an hour trying to figure out the issue. Turns out it’s something Doom Emacs does. After looking at what settings Doom changes relating to the window, I accidentally discovered that the issue was…… menu-bar-mode! Doom disables menu-bar-mode. I would too, I’m on MacOS. If menu-bar-mode is nil, you still have your menu bar in the… menu… bar… the global menu at the top of the screen. Well, turns out that setting it to t, even though it does nothing visually, magically makes tabs work. Incredibly annoying, bizarre, and stupid, but it’s resolved and I now have working native tabs.
Bluetooth codecs shouldn’t be this annoying
I use a pair of Sony WF-1000MX3 earphones. These have a pair of built in microphones that can be used when taking phone calls which is nice. However, for some reason when using the microphone the audio quality drops dramatically.
On Linux and GNOME I can use system settings to explicity tell my OS not to use these earphones as a microphone, and then I can tell it not to use the awful “headset” codec and use the high quality AAC codec instead. MacOS, no such luck. When using my earphones the second I activate the microphone (i.e. I accidentally select the dictation page in settings) suddenly my audio quality drops dramatically.
When I first connected my earphones, my sound quality was absolutely terrible until I rebooted. Before rebooting I tried to debug it as I thought it would be permanent. A number of guides out there suggest downloading the XCode developer tools (which is an incredibly stupid workaround) and using a bluetooth utility to fix this which I tried, but this utility doesn’t exist in new versions, and I don’t believe works with Arm Macs.
After a reboot it turns out that MacOS is normally pretty good at automatically switching those settings. If I accidentally view the dictation page and my audio quality drops, when I leave after a while the codec switches back and the sound quality returns.
The touchbar isn’t as useless as I first thought
I, like most people, thought that the touchbar was an awful idea. After using it for a little while, I’m happy to admit that I was wrong.
First things first, Apple made a great decision when they decided to bring back the physical escape key. I don’t really use the function keys (in Emacs I don’t have them bound to anything important) so I don’t miss them, but I do use the escape key frequently so I’m glad it’s back. Also, even though the function keys are gone most applications I’ve used replace them with something else that I do use instead.
In Apple’s applications the touchbar is particularly well implemented. Take Safari for example: In normal use, the touchbar shows you your open tabs; cool, but not ground breaking. Although, quick note here, you cannot select pinned tabs through this which is pretty disappointing. Then, you open a video. The touchbar shows you a scrobbling bar that you can drag around to search through your video alongside a button that pops out the video into picture-in-picture mode. This, in my opinion, is super useful. The scrobbling on its own is great, but the pop-out button is just super convenient so I don’t need to right click the volume button to do it (which, side note, not the most user friendly way). Finally, you start typing something in and the touchbar shows you predictive text options. This happens across most text entries, and I find it suprisingly useful (particularly with a few hard-to-remember spellings). All of this just the interactions with a single application!
I would note that sometimes the functions of the touchbar can feel a little… opaque? Sometimes an icon simply isn’t enough to convey what a button does, and in apps like this I either have to manually edit the touchbar (the editor shows you the labels associated with each button), trial and error each button, or simply ignore the button altogether.
Other stuff
Here’s a couple of little things I’ve noticed or thought about.
First, like in Linux, it’s incredibly easy to rebind the Caps Lock key to something useful; specifically, you can rebind it to Control, Option, or Command, all directly in the settings panel. No need to install some extra tweaks software or run a terminal command, it Just Workstm.
I mentioned iTerm2 earlier, and it really is an incredibly good terminal emulator. My favourite feature are so far are the way you can bury terminals. I mentioned the port forwarding earlier, and that’s my primary use case for it; I need this command running, but I don’t need to look at the terminal unless the pipe breaks so just hide it from me. Don’t put it in the dock or hide it on my last desktop, just run it in the background. I also love the automatic profile switching. I use the default profile most of the time, but when I run terminal Emacs to edit something the keybindings clash. A little inconvenient, but I simply set up a profile with minimal keybindings and have iTerm switch to that profile when I’m in Emacs. When I’m done it switches back to whatever it was in before.
But that’s not all; iTerm2 has one unbelievable feature: Unbeatable tmux integration. When I connect to a tmux session, I simply use tmux -CC a. Now, all tmux split and tabs become native iTerm tabs and splits! Obviously it’s not totally necessary, but it makes using tmux just that little bit easier. The shortcut to full screen a split frame doesn’t matter anymore, I can just use iTerm’s native frame maximising shortcut. Plus, as I mentioned earlier, I can just search the Menu Bar with ⌘⇧/ to find the shortcut. Absolute magic.
A long time ago I got a Logitech MX Master for a ridiculously good deal and I’ve been using it for ~4 years now. When you press your thumb down on Linux, however you move your mouse it is just ignored which is nice for adjusting your hand position. I never used it, but it was an alright feature. Well, it turns out on MacOS so long as you have the Logi Options app installed that this hidden thumb button is actually a gesture button! The gestures are basically the same as the 3 finger workspace gestures on the touchpad, you just hold the button and push the mouse:
- Up to go into the overview (or whatever the Mac term for it is)
- Down to go see all other instances of your current app are running
- Left and right to switch workspaces
This is a much better use for this (previously seemingly useless) button, and it’s really intuitive when I’m at a desk with a mouse and keyboard. Now I just wish it had the ability to press ⌘ and Scroll wheel to quickly switch workspaces.
This is pretty trivial, but on my Linux laptop my “Downloads” folder is an absolute state. I download something, use it for whatever I’m doing at the time, then forget it ever existed. As a result, my downloads folder is hundreds of PDFs and binaries I use for work. Having a “Downloads” icon on my dash silently shaming me means I have a empty downloads folder permanently. The same goes for the bin, I’ll drag something from downloads to the bin and immediately empty the bin. Again, I know it’s trivial, but it’s a minor change that means my computer is just a little cleaner. I’ll either delete useless files, or sort them into the correct place to find them later rather than just running a file search on my entire /home folder whenever I need something.
Footnotes
I wonder if AI has had a big impact in the state of the Linux desktop?↩︎
I will say right now, MacOS has issues. However, I regularly have to use Windows, and it is miserable. I used GNOME, KDE, MATE, XFCE, i3, Sway, QTile, and more, and every single one of them was equally or more flawed than anything MacOS provides. I very happily use MacOS every day, and yeah some times it can be a little annoying, but for the most part it is spectacularly well built.↩︎
This was the case in 2020, please do not @ me if this is better now. I’m glad it is for the Samsung users of the world, but I’m not one of you anymore.↩︎
I haven’t even touched the community. I love the Apple developer community, and everyone seems so much more friendly. The Linux community can be really unpleasant, elitist, argumentative, and just rude. I don’t miss interactions in the GNOME Matrix server or IRC – Asking for help and being made to feel like an inconsiderate jerk for daring to disturb, treated like a moron for not understanding something immediately. The online commentary around Linux from within the community is horrific, and it’s another thing I simply do not miss.↩︎