Find Federico on MastodonFind John on MastodonFind Alex on MastodonFind Club MacStories on Mastodon

A Shortcut to Create Shortcut Presets in visionOS

SHORTCUTS CORNER

Get help and suggestions for your iOS shortcuts and productivity apps.

Shortcuts Essentials

A Shortcut to Create Shortcut Presets in visionOS

Now that visionOS 1.1 has fixed the bug that caused windows to disappear when launching apps with shortcuts, I realized that it was time to start using shortcuts a lot more when working with the Vision Pro. And so, just like I can now have shortcuts that create “window presets” for me with a single tap, I came up with a way to spawn multiple shortcut buttons in my workspace at once. As you can guess, my solution is a “meta shortcut” that makes more shortcuts easily accessible.

If you recall, a while back I reviewed Shortcut Buttons, Finn Voorhees’s excellent utility to create virtual buttons that you can place around your workspace to run shortcuts with one tap rather than having to use Siri or the Shortcuts app. The app is great, but in visionOS 1.0, its effectiveness was hindered by the aforementioned bug that caused windows to disappear if you ran a shortcut that opened something else. As a result, despite liking the app, I didn’t use it much because every time I ran one of my shortcuts, it destroyed my carefully-curated set of windows.

With visionOS 1.1, that is no longer the case, which means I can start taking advantage of Shortcut Buttons in my workflow. However, this brought on a new problem: I didn’t want to manually recreate multiple buttons every time I worked with the Vision Pro.

My solution is a shortcut called Shortcut Button Maker, which uses the Shortcuts actions that were added in Shortcut Buttons 1.1 to programmatically recreate buttons with no interaction from the user. In putting this together, I went a step further: I created a shortcut that can spawn a pre-defined selection of multiple shortcut buttons in one go, all while keeping each shortcut’s name, color, and icon intact.

To achieve this, I used a combination of the ‘Get My Shortcuts’ and ‘Filter Files’ actions paired with a ‘Repeat for Each’ loop and the ‘Make Shortcut Button’ action. The idea is simple: After retrieving all of the user’s shortcuts from the app’s library, the shortcut can filter one or more shortcuts that match a specific name. Let’s say that I want to create three shortcut buttons at once. In the ‘Filter Files’ action, I can put in the names of the three shortcuts I want and use the ‘Any’ filtering condition to make sure that, of all my shortcuts, only those three are passed to the next action.

The actions that deal with retrieving three shortcuts from my app’s library.

If you want create your own buttons with Shortcut Button Maker, you’ll have to manually change this action to reflect the names of the shortcuts you’re looking for.

After finding all the shortcuts we need, Shortcut Button Maker uses a repeat loop to turn each shortcut into a button for visionOS. To do this, we can leverage Shortcut Button’s dedicated action, which requires that the ‘Repeat Item’ (a shortcut) be processed as a ‘Dictionary’ item. This is necessary for Shortcut Buttons to extract metadata from each shortcut such as its title, color, and glyph.

The action that creates the buttons.

And that’s about it! Once Shortcut Button Maker is all set up and ready to go, just run the shortcut, and boom – multiple shortcut buttons will open in front of you on visionOS:

Multiple buttons created with a single shortcut.

It’s a small fix, but I’m glad that Apple made shortcuts work better with other app windows in visionOS 1.1. Given the lack of any real window management tools in the operating system right now, every little bit helps when it comes to speeding up the process of launching apps. There’s no better way to do that as of today than Shortcuts, and there’s no better way to run shortcuts in your workspace than the Shortcut Buttons app.

You can download Shortcut Button Maker here.

Submit a Shortcut Request