BetterTouchTool and Stream Deck
It was promised some time ago, and after a long wait1 BetterTouchTool has added Stream Deck support, and it’s awesome. It’s a beta feature, but I’ve already found it to be an amazing extension to my Stream Deck.
I’ve only begun to dig into the possibilities here. Setting up your Stream Deck with BetterTouchTool is a little more cumbersome than using the Stream Deck software, but the scope of capabilities is vastly larger. Fully scriptable buttons, the ability to control buttons from external scripts, and anything BetterTouchTool can do can be assigned to your Stream Deck. And you’re no longer limited to just folders and pages, now you can do things like hold a button and have a row of options temporarily change, allowing things like multi-press triggers.
Plugin or Full Control
You can run BetterTouchTool as a Stream Deck plugin, integrating it into individual buttons in the Stream Deck software, or BetterTouchTool can take over control of your Stream Deck completely. The latter is supposed to be more performant, but it also means you lose all other Stream Deck plugins. I wasn’t willing to let go of those quite yet, so I’m running as a plugin. There are only a couple of plugins I would want to fully replicate in BetterTouchTool before switching over, namely the CPU load plugin (which won’t be hard to recreate with some shell scripting) and the Spotify integration that shows cover art while playing. The Touch Bar widgets in BTT already include that functionality, so I imagine a Music/Spotify Stream Deck plugin isn’t far off. The weather widget is superior to the Stream Deck weather plugin already, and you can have multiple buttons for future forecasts. You can have a page that shows you a full 7-day forecast, if you want to. The Zoom controls I have in my Touch Bar are easy to port to the Stream Deck, so that’s already covered.
Bunch Buttons
One of the new things I can do is have Bunch icons in my Stream Deck that actually reflect the open/closed status of the Bunch. I’ll probably eventually update the btt_stats script to handle this more elegantly, but here’s the script I’m currently using to do that.
Just save the script and add a shell script widget. Set the script to this:
/path/to/bunch_status.rb sd title "Bunch Name"
Then you can add a shell script action to toggle the Bunch. Just call:
open 'x-bunch://toggle/Bunch%20Name'
(Using a shell script open
command instead of an open URL command avoids your web browser being involved in the process.)
Now the button will check the status of the named bunch and return the name of the Bunch along with a grey (closed) or green (open) background color. If you assign an icon to the widget, just remove the word “title” from the bunch_status.rb
command to avoid adding text.
Media Control
I’ve also added buttons for volume control (using BetterTouchTool’s media controls), which can now have key repeats, so I can just hold down volume up/down and gradually adjust the volume. I added a mute button as an on/off button that reflects the mute state. Because there aren’t separate “mute” and “unmute” actions, this can get thrown off if I mute the volume using another method. I think I might have to write a script for it that actually returns the current state. Same with my mic mute, it just triggers a hotkey that controls Mikrofon, but can get out of sync. To be continued.
Shortcuts and Keyboard Maestro
If you’re into macOS Shortcuts, there’s a widget for that. It can run shortcuts and receive responses, so you can easily turn all of your Shortcuts into dynamic Stream Deck buttons. Anything Shortcuts can do is now easy to add to your Stream Deck.
You can also use AppleScript widgets to control Keyboard Maestro macros. And the macro can use BetterTouchTool scripting to affect button states, which makes it more powerful than using the KM plugin for Stream Deck. So anything Keyboard Maestro can do, your Stream Deck can do. Between the capabilities of BetterTouchTool, Keyboard Maestro, and Shortcuts, plus shell scripting and AppleScript, I can’t think of much you can’t do.
Home Automation
I use Indigo for most of my home automation, and I like my Stream Deck to be able to turn my office and basement lights on and off, and set the brightness for late night hacking.
I use Indigo’s Restful API to just send URLs that perform various actions. In the Stream Deck software this has always meant having a separate button for on and off, and multiple buttons for brightness settings. It’s also slow to send URLs, so there’s a 1-2 second delay when hitting a button.
Thanks to the scriptability of BTT, I can now have toggle buttons that show the current state. A Shell Script widget queries the device for on/off/brightness and updates the button state. The Shell Script action it runs uses curl
to call the Indigo actions, and the response is immediate. So what was five buttons before is now three. I may make it four buttons and do the extra scripting to incrementally increase/decrease brightness of my office lights, but for now I just have a preset that toggles between 20% and 100%.
Here’s a basic version of the script I’m using for Indigo control (sans the brightness toggles).
Multiple Stream Decks
I have two Stream Decks, one Regular and one Mini. In the Stream Deck software I have a screen on the Regular that can change the profile on the mini. BetterTouchTool can take over this responsibility, but it seems to take a significant amount of configuration, as opposed to the simple “Switch Profile” selector in the Stream Deck software. Running BTT as a plugin and just adding buttons to appropriate profiles seems like the path of least resistance for now.
App-Specific Buttons
The documentation is currently missing, but you can also have app-specific buttons. It seems a little quirky, but I have gotten it working. I might experiment more with it, but I’ve never used the same feature much in the Stream Deck software because most of the buttons I want to use are global, and when I want specific controls for an app, I just use the Regular to load them on the Mini and not worry about them disappearing as I switch apps.
What About the Pedal?
I don’t have a Stream Deck Pedal, but BetterTouchTool also includes support for that. Now I’m tempted to get one…
Check out the docs to see what’s already available. I look forward to seeing this developed further, and if I know Andreas, there will be plenty of amazingness to come.
Update: Andreas let me know he’s almost finished with the Now Playing widget, as well as Dock and Calendar widgets. Excellent.
-
I know, I should talk… *cough*nvUltra*cough* ↩