After last year, I’m gonna try really, really hard not to bitch about Apple if at all possible in 2020. But what good are New Year’s resolutions if you don’t break them before the end of January? So, here’s a small bug that for the life of me I can’t figure out along with my solution.
I have a number of what I call “working folders” on my Mac. They’re the main folders where my projects, source code, temporary files, and other in-progress files live. I’m constantly navigating to them, dragging files in and out of them, etc. In no particular order they are...
~/Downloads is exactly what you expect. It’s where everything from my web browsers go.
I live in my synced cloud folders. I was a paying Dropbox customer from 2008 until 2018, then switched to Google Drive because I was also paying for Google Photos and decided to cut costs, and then had a quick dalliance with iCloud Drive in the first half of 2019. But, it turns out every sync service is horrible and awful except for Dropbox. So, I’m happily back on the wagon - even after they raised their prices and destroyed their Mac app. That means I am constantly diving deep into
~/Dropbox to find reference material, share files, etc.
I went paperless over a decade ago. Every physical paper worth remembering or that I might possibly want to reference in the future along with all of my kids’ artwork and schoolwork gets captured in Scanbot (RIP my beloved ScanSnap) and automatically uploaded into
/Dropbox/_Inbox. It’s the temporary staging area for all the documents and files I need to process before I rename and sort them into their final storage locations.
~/src is, you guessed it, where all of my source code lives. Everything is in a git repo, so there’s no need for anything in this folder to be in
~/tmp is a sort of working directory where I put files that don’t need to sync across machines and also large files that I don’t need long-term but can’t put on my Mac’s
~/Desktop because that syncs to iCloud and I don’t want to waste the bandwidth.
Anyway, the point of all the above descriptions is to make the case that those are the five folders I deal with all the time if not literally every five minutes. And blame it on my crazy personality, but I hate wasting time clicking around in Finder windows. I need fast access to them.
For a number of years the solution was simple. I just added aliases to each of them in my Dock.
That let me open them with a click, or even navigate into their subfolders. I could also drag and drop files into and out of them. It was great.
But then sometime around the later stages of Mojave, the folders would just disappear. I’m serious. I’d reboot my Mac and they’d be gone from the Dock. So, I’d add them back. And then a day or two later - even though I hadn’t yet rebooted a second time! - they’d vanish again. I wasn’t running Mojave betas, and the problem has persisted through today running stable Catalina 10.15.2.
When weird things happen I’m usually pretty good at tracking down if not the cause then at least what conditions trigger the bug. But this one has had me stumped for the better part of a year. I’m so confused I’m not even mad.
I tried to work around the problem by adding folder aliases on my
~/Desktop, but that just wasn’t as convenient. One afternoon I thought I was especially clever and tried to write a shell script that manipulated one of the Dock’s
.plist preference files to automatically re-add the folders when my Mac restarted. But I never got that to work reliably.
I’ve also been a heavy user of Alfred ever since Quicksilver gave up the ghost, so I know about its “Quick File Search mode” setting in Preferences. That’s great for getting to obscure files/folders quickly, but it’s just not fast enough for me for these five particular folders. For some reason having to hit the apostrophe key to enter Alfred’s file search mode just screw ups the next few letters I type every time and I always end up making typos and regretting my life choices.
So, I did what I almost always do when I face a situation of deep despair on my Mac. I reached for the greatest Swiss Army knife of them all - Keyboard Maestro - and came up with an incredibly lo-fi solution that isn’t as feature rich as what those other apps offer or as convenient as Dock folders (when they don’t disappear), but it works for me!
It’s a Keyboard Maestro macro that I’ve assigned a global hotkey to. When invoked, it displays a list of those five folders. I can arrow up/down to select one, or type to filter, and then press return to select. The picker window goes away and Keyboard Maestro opens a new Finder window with that folder.
Here’s the picker window...
And a quick video of it in action...
And the macro itself...
The whole thing is stupid simple. But I’m happy with it. Especially since the bug this is designed to work around is over a year old and, well, you know.
You can download the macro and import it into KeyboardMaestro here.