Skip to content

Rob Griffiths

A simple AppleScript to reveal System Settings’ anchors

I stumbled upon this simple AppleScript while looking for something else, but it's incredibly useful for scripting System Settings…so I'm posting it here in case the original site ever goes away.

To get the names of all the anchors for a selected pane in System Settings, just run this in Script Editor:

Run that on the Desktop pane, for instance, and the output is this:

{anchor "Dock" of pane id "com.apple.Desktop-Settings.extension" of application "System Settings", anchor "HotCorners" of pane id "com.apple.Desktop-Settings.extension" of application "System Settings", anchor "MenuBar" of pane id "com.apple.Desktop-Settings.extension" of application "System Settings", anchor "MissionControl" of pane id "com.apple.Desktop-Settings.extension" of application "System Settings", anchor "Shortcuts" of pane id "com.apple.Desktop-Settings.extension" of application "System Settings", anchor "StageManager" of pane id "com.apple.Desktop-Settings.extension" of application "System Settings", anchor "WindowsApps" of pane id "com.apple.Desktop-Settings.extension" of application "System Settings"}

With that information, you can jump directly to a given area in AppleScript with code like this:

I'd always wondered how people found the anchor names, and now I know.





Create a Time-Machine-like backup of Keyboard Maestro macros

I use Keyboard Maestro a lot—a quick search here reveals how often I write about it, and I use it much more than I write about it.

I back up my macros reliably, as part of my overall backup plan. I also sync them between my Macs. And a while back, that caused an issue: Between the regular backups (Time Machine and removable external drive), I had a sync issue and I lost a few hours' worth of work on a new macro, and some untold number of old macros vanished. I recovered the older macros, but the new work was just gone.

So I set out to find a better backup solution for my macros.

I wanted a tool that created something close to versioned backups that were browsable in Finder, that didn't take a ton of drive space, and that made it super-simple to restore any single macro or macro group*Time Machine backs up the entire macros file, not individual macros or groups from some point in history.

I also wanted it to be completely risk-free to use, never modifying my macros in any way (so no import tool in the macro). I wanted Keyboard Maestro Time Machine, basically. As I couldn't find an existing solution that worked in that manner, I wrote my own.

[continue reading…]



The macOS’ version of the cp Unix command won’t create links

I ran into this while working on a Keyboard Maestro macro that creates hard links: The macOS version of cp won't create links, at least not in Sonoma. In Ventura, it works even though it throws the same error as it does in Sonoma.

Copying as hard links is part of the cp feature set, fully covered in its man pages. But it doesn't work in macOS. To confirm, try this:

When I ran into this, I searched and discovered that someone else had run into the same issue,1Apple Developer login required but that's the only mention I could find.

I have filed this bug as FB13255408 with Apple, and I'm hopeful they fix it soon. There is a workaround, obviously: Use ln instead. This works fine for individual hard links, but using cp to quickly copy an entire folder as hard links is a nicer implementation.



More helpful help for Terminal commands

I use Terminal a fair bit, for any number of things. But I don't use it all the time, and that means I sometimes struggle to remember syntax of commands. "Was it rsync source destination or the other way around? Or was it ln that was backwards of what I thought it should be?"

You can open the man page for a command, of course, but sometimes there's so much there that finding the simple thing you want is tough. Enter tldr, installable via Homebrew or MacPorts. tldr skips most of the detail of the man pages, providing user-curated examples of how to use a given command.

As an example, here's the aforementioned rysnc command's man page:

[continue reading…]



Replace the mini music player that Apple took away

Back in the early Mac OS X iTunes era, there was a wonderful small window available that had control buttons, volume control, a visual progress bar, and a text display showing the artist, song, and album—it could even display a graphic equalizer in lieu of the artist-album-song info:

It was perfect. Sadly, it was last seen in iTunes 10 in Mac OS X 10.7. And today's version, while offering a mini mode, isn't nearly as mini or as functional as it used to be; read on for some details…

tldr summary: Mario Guzman's Music MiniPlayer is a full-retro near-perfect replacement for the original mini player. It's free, and I love it. If you're not into retro UI, Silicio on the App Store is also free and quite good, though you can't freely resize the window.

[continue reading…]



Revisiting literal music videos, 14 years later

2023 Update: Over the span of some 14 years since I wrote this (wow), all of the YouTube links broke. I've fixed them (except for two that sadly vanished), though you may see a "view on YouTube" message instead of being able to watch them as overlays here. I also added three more videos—two thanks to comments from Aaron and Jordan—and one I just stumbled on while searching for new links. Originally published June 10, 2009.

Recently a friend introduced me to something called literal videos. A literal video is a remake, with a twist, of a popular music video, usually something older from the 1980s or 1990s.

The twist in the remake is that the lyrics for the song in the video are changed to reflect what's actually happening in the video. So if there's a shot of a car driving down the street, the literal video's lyrics will be something along the lines of "So there's a car ... driving ... driving down the street."

The words are sung by someone doing their best to match the musical sound and pacing of the original singer, making it seem like this is how the video has always been.

It's actually much harder to explain than it is to demonstrate. So, without further ado, here are four six of the funniest (to me, at any rate) literal videos I've found. If you haven't seen the original versions of these videos, the literal videos may not be quite so funny; I've included links to the originals, too.

[continue reading…]



Speedier screen sharing startup in Sonoma

macOS Sonoma introduces a revised Screen Sharing application that lives in the Applications → Utilities folder1Though that's not really where it is, but that's not important…. It presents a list of recently-connected devices:

Select one, and you'll see the username and password dialog for that machine. While the GUI is nice to have, it's also slower than the old method: In Ventura and earlier, you could launch the (not in Utilities) Screen Sharing application, and start typing the IP address:

Select the host from the list, and you were done. This is much quicker than launching an app and waiting for the GUI, then navigating and selecting the desired machine. After just a bit of digging, I found a much quicker way to connect to my Macs in Sonoma (and earlier versions of macOS): The "vnc" URL scheme.

[continue reading…]



A quick iPhone 13 Pro vs iPhone 15 Pro photo comparison

I upgrade my phone every two or three years; I just moved from the 13 Pro to the 15 Pro, primarily for the new camera features. I'm not a pro photographer, nor even a prosumer photographer. I do like seeing how things have progressed, however.

So here are three photos shot with each phone, taken seconds apart, with each camera set to its highest resolution and HEIC-formatted photos. I then edited the photos only to improve their alignment, and reduce the sizes. See if you can guess which photo of each set was taken with which phone.

Indoors

[continue reading…]



New theme with a somewhat updated look

My blog's general appearance dates back to 2014, with a face lift in 2017. But the site was still using a (very!) old theme as its base, and that old code was throwing a ton of errors into the logs (mainly warnings). I felt it was time to find a new base to build from, so the site is now using a modified version of the Neve theme.

Things hopefully look mostly the same, though there will be some minor changes made going forward as I discover things that aren't working as they should, and clean up some loose ends—and probably change my mind on fonts a dozen more times. Please let me know if you run into any issues with formatting or functionality on any of the pages.

Update: Thanks to some great help from Many Tricks' founder and resident CSS expert Peter, the theme should now look fine on all devices—and he cleared up many other minor issues I was having. Thanks, Peter!