Dynamically generating menus for Action Button or Shortcut in Dock

Listening to episode 139, which was great, and inspired me to share this. Maybe this is so 2021 to everyone else, but it’s recently made my life easier:

While I don’t have an action button, I have a shortcut in my doc that is similar. It will present a different menu, based on variables like wifi and time.

But, I have some of the same shortcut actions showing up in multiple menus, and changing/adding/moving and organizing was hard to keep track across multiple menus, so I wanted to simplify things.

My master shortcut generates a number from 1-6, based on time and location. Then it pulls a list from data jar (which is currently):

234: Things: Phone
12: Order Venti at Mission
2: Order Venti at Hayvenhurst
134: Aqara Home _
6: WiFi Off
25: Take This Down
23456: In Person Focus Prep
25: iOS Zoom Menu
25: Bathroom Code Menu
25: COFFEE
345: Calzy _
5: Swift Scan _
123: Weight (New)
13: See Weight History
12: Pete Morning
34: BT On
34: BT Off
123456: ***CANCEL***
25: Vaccine Card
4: LinkedIn Recruiter
5: Get Home Reminders
1234: See Morning Reminders

The shortcut filters this list by that number, deletes all text before the first letter, and builds a list to choose from.

After I chose an item from list, if the chosen item ends with “_ ,” it removes it and passes that name to an “Open App” action. If not, it passes the name to a “Run Shortcut” action.

I keep this list as a text file in IA writer, so I can add, move and change which items show up, all from one text file. i have another shortcut that simply reuploads the text from this text file to DataJar.

Hope this inspires or helps someone else!

3 Likes

Using the underscore to open apps is a fantastic idea! I currently have an open app shortcut, but your method seems simpler than mine. Your approach to organizing your list through multiple menus has been incredibly helpful for me.

I prefer to use Arc on mac, but use safari on iphone/ipad. Your approach inspired a change in my automations too, for keeping a centralized list of my most frequently used websites for work. I now keep a dictionary in Data Jar. The keys match tab names in Arc, and the values have the URLs. On the idevices, i use Shortcuts to pull the dictionary from Data Jar, present a list of choices, and open the selected URL. On Mac, I most commonly launch automations and scripts via scripkit.app (similar to Alfred/Raycast). So a script there pulls the tab names from Data Jar (by getting the output of a Shortcut that returns that), lets me choose from that list of tab names, and opens the selection using some applescript to open it in my “Work” workspace in Arc.

1 Like

that is really great to hear. glad to finally have helped someone else on these forums, given how much help I have received, haha!

I’d be interested in seeing your actual shortcut if that’s something you could share. Even though I have an action button, I like the approach and would like to learn more. Thanks!

Happy to. I don’t know if it’s “commented” enough to make any sense, but in case it helps, here’s the link:

Menu From Data Jar Shortcut

1 Like

Thanks so much! I have downloaded it and will examine it soon!