Into the Stream Deck

The Elgato Stream Deck is a nifty device aimed for customizable interface for streamers and broadcasters, and I didn’t use it for any of that… one word: macros.

tl;dr

  • Elgato’s Stream Deck and it’s software capabilities
  • 100% not using it for streaming, but mostly just macros and daily automation
  • Basic app/script launch
  • Intro to Stream Deck’s profiles and application aware profiles

A little on the hardware

If you’d like you can read more about it on Elgato’s page here. It comes in three sizes, Mini (6 keys), Standard (15 keys) and XL (32 keys), it even offers a mobile version that runs on iOS and Android.

Though this devices is designed for one use, my immediate thought was macros. I have been using Keyboard Maestro from sometime and often use a key combo to initiate a function, but a deck with pictures? Maybe even gifs to trigger macros, sign me up! I wont get into my Keyboard Maestro setup as that could, and may be, a blog post all of its own.

(A lot of the following examples are synthesized from something I am currently doing, or have done, and not specific to a singular device. All that to say I don’t every recommend accessing or using personally associated apps on a work device.)

Getting Set Up

Get a Stream Deck, whatever size suits your style/desk. There is effectively a possible infinite folder structure with later Stream Deck firmware/os updates so I went with the “Standard” model as 15 keys seem a happy medium.

Snag the software for your OS and get going.

Making a plan… some basic items for illustration:

  • Launch Slack, possibly even users or specific channels
  • Launch user specific Chrome browsers (work/personal)
  • Some basic tooling around apps I use on the daily
  • Zoom (Call controls)
    • Code (Documentation, text manipulation, basic git wrappers)
    • VMware Fusion (VM Controls)

Down the rabbit hole

Lets take a look at some examples within the apps I mentioned above…

A note on my shorthand, when I reference something like System > Website, I am saying within Stream Deck’s configuration (sidebar) under the System header I used Website function, so on and so forth.

Slack

Like a lot a folks I live in Slack during the work day, and the quick search/channel jumping is fine, but I wanted to see if there was a way to make some shortcuts to channels/DMs I spend the most time… and it was actually pretty easy on macOS. I used an application url callback for Slack, and that looks something like this:

slack://channel?team=$TEAM_ID&id=$CHANNEL_ID

The quickest way to find these values out is load the slack team/channel you’d like to access in the browser:

https://app.slack.com/client/T04QVKUQG/C0533K6HC

The first T04QVKUQG is the team id, the second is the channel or user C0533K6HC so swap those out with the callback URL above:

slack://channel?team=T04QVKUQG&id=C0533K6HC and voila

Stream Deck Example URL

Add that to a System > Website as the url, on clicking you should launch directly to your desired channel or user. A team id won’t change per “Slack” instance (team) so you can note this and then while in slack, right click > Copy Link on a channel name and you’ll get a url such as https://$team.slack.com/archives/C0533K6HC where the last part as we see, is the same channel identifier.

Chrome Profiles

This is another simple one, that just needs a slight bit of digging. If you use multiple Chrome profiles, you just need to determine what those profiles are and how you can reference them. In Chrome (while in the profile you seek to identify) open chrome://version/ and look for Profile Path:

Profile Path: /Users/$user/Library/Application Support/Google/Chrome/Profile 1

That is the name of the Chrome profile (Profile 1) we care about, you can test this by running in the terminal:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --profile-directory='Profile 1'

and if its the first profile created, its most likely:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --profile-directory='Default'

A word of warning, running --profile-directory='NonexistentProfile' Chrome will just generate a profile if one does not exist, easily remediated via the “Other People” UI box launched via your user icon.

I pipe these commands through to Keyboard Maestro, which is for sure over kill, but you could easily call them in various ways such as the configuration System > Open > App / File where this is the script you wish to run.

Application Awareness

So far we’ve talked about triggering some basic functionality with the Stream Deck, launching apps, or specific parts of apps/urls. I have a “base” profile that the stream deck goes to by default and some sub “folders” that look something like this (slimmed down for illustration):

default_profile
├── fusion
├── personal_chrome
├── slack_personal
│   ├── channel_a
│   ├── channel_b
│   ├── channel_c
│   ├── user_1
│   └── user_2
├── slack_work
│   ├── channel_a
│   ├── channel_b
│   ├── channel_c
│   ├── user_1
│   └── user_2
├── spotify
├── system_controls
│   ├── lock
│   ├── screen_brightness_preset_a
│   ├── screen_brightness_preset_b
│   ├── screen_saver
│   └── toggle_audio_out
├── work_chrome
└── zoom

Any apps such as Zoom, VMware Fusion, or Spotify I didn’t create a static sub folder of items for these apps, instead I used Stream Deck’s ability to switch to a specific profile when an app is launched, “Smart Profiles”.

Smart Profile Example

I see two big benefits here:

  • any time an app is opened/in the foreground Stream Deck displays that profile
  • your not constantly navigating and in and our of sub folders trying to access different actions

Zoom & VMware Fusion

These profiles are application aware, my base profile simply launches these apps respectively, the app coming to the fore ground causes stream deck to load the profile for each. These applications I created “Hotkeys” for common keyboard commands and shortcuts for these app I find myself in a lot. In Stream Deck, System > Hotkey, you can define, name and give an icon to a hotkey trigger.

Zoom Examples

  • Toggle Mute ⌘ ⇧ A
  • Controls ^\
  • Start/Stop Share ⌘ ⇧ S
  • Chat Panel ⌘ ⇧ H
  • Toggle View ⌘ ⇧ W

VMware Fusion Examples

  • Take Snapshot ⌘ ⇧ S
  • Show Snapshots ⌘ S
  • Settings ⌘ E
  • Get Info ⌘ I
  • Show Machine Library ⇧ ⌘ L
VSCode

For VSCode I have a few shortcuts, and some script invocations, but I also want to illustrate the ability to go to a specific profile via a Stream Deck configuration. While when VSCode is in the foreground, its profile will be on the Stream Deck, but you can override this by adding a link to another profile, Stream Deck > Switch Profile. So I have created a git specific profile for a lot of wrapping around git and gh. So while in my VSCode profile I can quickly switch to Git items, and then switch back (via the same configuration, just VSCode profile) on the fly as needed. This is handy as using VSCode’s internal terminal wouldn’t trigger Stream Deck in the same way as say iTerm or Terminal.app. To visualize it as above, it would look something like this:

default_profile
├── fusion(launch app)
├── vscode(launch app)
└── zoom(launch app)

vscode
├── snapshot
├── library
└── git(switch to profile)

git
├── branch_create
├── sync_main
├── pr
├── stage
└── vscode(switch to profile)

There is also the ability to Stream Deck > Switch Profile and set Next Profile and this button will take you to the next profile as configured in your Stream Deck software.

There is also a VSCode “Action” pack available via More Actions... that includes some functionality like Create Terminal, Open Folder and Insert Snippet.

“What a wondrous boat ride…”

This is just the surface of what Stream Deck’s software itself can do, I haven’t even touched on all of the built in features, the additional “Actions” available, or the community created plugins (Unofficial Stream Deck Plugins) implemented via the SDK.

As for me, while it has some basic macro functionality, it mostly acts as a trigger for far more complex automation in underlying Python scripts or Keyboard Maestro workflows. Who knows, maybe I will dive into that in another post… no promises there.

And any icon you want to use, can even be a gif. chef kiss

Stream Deck
Unofficial Stream Deck Plugins
Corcules/KMlink
Keyboard Maestro
Zoom Shortcuts
Git
Github CLI
Stream Deck SDK
Stream Deck Quick Start