If you have a Stream Deck, you probably have some buttons that launch apps. Using Bunch adds a ton of options beyond just launching a single app: you can have a button that toggles entire groups of apps, running commands and scripts, changing your wallpaper, hiding your Dock… you know, all the things Bunch can do.
The core of the trick is Bunch’s URL handler. You can use x-bunch://toggle
(or just x-bunch://open
if you don’t want to be able to quit the Bunch). Just add your Bunch name to the end of the url, replacing any spaces with %20
, and you have a URL with which you can toggle any Bunch. For example, to toggle my Marked Screencast Bunch, I would just use x-bunch://toggle/Marked%20Screencast
.
I discovered after further exploration that the default “Open Website” action for the Stream Deck does in fact work with URL handlers, there’s just a delay in it actually launching. But if you want to skip Keyboard Maestro, you can simply put
x-bunch://toggle/BUNCH%20NAME
into a System->Website button’s URL.
So the biggest hurdle is just making a button trigger a URL. The default web launch commands don’t seem to do the trick with system url handlers. The best solution I’ve found is to use Keyboard Maestro, and since I already owned it, I didn’t look much further. I’m certain there’s an existing plugin for Stream Deck that would handle this directly, but I didn’t find it yet.
In Keyboard Maestro you’ll set up a macro for each Bunch URL. The macro contains a single action: Open URL, with the x-bunch
URL and a target of “Default Application.”
Assigning the macro to a key can be done in two ways. There’s a default Keyboard Maestro plugin available from the “More Actions” menu in the Stream Deck configuration app. That plugin allows you to assign a custom USB Device Key to each button, which you can then apply to the trigger in Keyboard Maestro. Just set up the button, then go to Keyboard Maestro, add a USB Device Key trigger, and then click the button you created on the Stream Deck.
The second way is actually nicer, in my opinion, but I discovered it after I’d already set up all my buttons. There’s a plugin available called KM Link which avoids the whole hotkey process entirely. Just grab the KM Link plugin from GitHub (click the “Code” button and download the zip) and install it by double clicking on the .streamDeckPlugin
file. Then you can drag a KM Link action from the Custom section of the sidebar to a button, and in its configuration you’ll get a list of all your Keyboard Maestro macros. Just select the macro to run and you’re done. This means you don’t have to assign triggers to the Bunch macros at all.
You’ll probably want to create some custom icons for your Bunches. Most of mine use an app icon, and I have a little script that takes the name of any installed app and outputs a PNG file, which you can then just apply to your button.
Have fun.