A while ago I got to know the Elgato Stream Deck through some projects at work. A few buttons with a tiny screen in each of them, which you can bind to whatever you want. Not much later I found a second hand Stream Deck mini for my own desk, and instead of the full blown GUI companion apps I ended up with deckmaster by muesli. A single go binary with a toml file per page, exactly my kind of tool.

The one thing I kept envying was the Stream Deck+. 8 keys, 4 dials and a touch strip above them, in a much slicker design. Deckmaster however never got support for it, and the upstream repository has been quiet since 2024. Luckily nix-er did some great work in their fork by adding the dials and the touch screen for the plus and all the other models. So I forked their fork, and with Claude as pair programmer I added the bits my own setup needed, something I would never have found the evenings for before :D

fork

My fork adds on top of nix-er's work;

  • an imageCommand widget: a script prints the path of a png and that png ends up on the key or the touch strip segment
  • switching to the next deck on SIGUSR1
  • a -check flag which validates a deck file without driving the device
  • a -lockfile: as long as that file exists all input is ignored and the deck is dimmed
  • refusing deck files and programs others can change, limits on image sizes and command output, timeouts on widget commands
  • an Arch Linux PKGBUILD and a systemd unit per device

The lock file is wired into my screen lock. My lock script touches /tmp/locked before i3lock starts and my unlock script removes it again, so nobody can play with my buttons while I'm getting a coffee.

systemd

With two devices on one laptop the old single streamdeck.service with a .path unit on /dev/streamdeck-mini didn't cut it anymore. The package now ships a template unit deckmaster@.service, one instance per device, which reads its settings from ~/.config/deckmaster/<instance>.env;

$ cat ~/.config/deckmaster/plus.env
SERIAL=<serial from deckmaster -device x>
DECK=/home/jan/.config/deckmaster/plus/main.deck
LAYOUT=plus
OPTIONS=-lockfile /tmp/locked

The interesting lines of the unit itself;

ExecStartPre=/bin/sh -c 'test -n "$$SERIAL" || { echo "SERIAL is empty in %E/deckmaster/%i.env, see deckmaster -device x" >&2; exit 1; }'
ExecStart=/usr/bin/deckmaster -wait -device ${SERIAL} -deck ${DECK} $OPTIONS
ExecReload=/usr/bin/deckmaster -check -layout ${LAYOUT} -device ${SERIAL} -deck ${DECK}
ExecReload=/bin/kill -HUP $MAINPID

-wait lets it start before the device is plugged in and survive unplugging it, which happens a lot with a laptop going in and out of the dock. The reload first runs -check, so a typo in a deck gets refused by systemctl --user reload instead of leaving me with a dark deck.

$ systemctl --user list-units 'deckmaster*'
  UNIT                    LOAD   ACTIVE SUB     DESCRIPTION
  deckmaster@mini.service loaded active running Deckmaster for Stream Deck mini
  deckmaster@plus.service loaded active running Deckmaster for Stream Deck plus

plus

The plus has three pages; main, system and claude. Turning the rightmost dial or swiping over the touch strip moves between them, pressing that dial brings me back to main. Every other page has parent = "main.deck", so it only defines the keys and dials it changes.

streamdeck plus

main

#   [weather][alerts  ][playlist][date ]
#   [tux    ][WhatsApp][Spotify ][clock]

The first two segments of the touch strip show the next item in my work calendar, read from khal, just like my conky used to do. The third dial is Spotify; turning it changes Spotify's own volume, pressing plays or pauses and tapping the strip skips to the next track;

[[dials]]
  index = 2
  [dials.widget]
    id = "command"
    interval = 2000
    [dials.widget.config]
      command = "playerctl -p spotify metadata artist;playerctl -p spotify metadata title"
      font = "bold;regular"
      color = "#fefefe;#8f8d8f"
  [dials.action]
    exec = "/usr/bin/playerctl -p spotify play-pause"
  [dials.action_left]
    exec = "/usr/bin/playerctl -p spotify volume 0.05-"
  [dials.action_right]
    exec = "/usr/bin/playerctl -p spotify volume 0.05+"
  [dials.action_touch]
    exec = "/usr/bin/playerctl -p spotify next"

The alerts key shows the number of firing alerts of my nomad cluster over a faded prometheus logo, red for critical, yellow for warning and grey when everything is quiet. The WhatsApp key reads the window title of WhatsApp Web in firefox to show whether something is unread, and focuses that window when pressed.

system

CPU and memory with the built-in top widget, download and upload speed, the laptop battery and, on the touch strip, the wireguard tunnels which are up, with the same icons as conky had.

claude

This one I use the most nowadays. One row for my work sessions, one for the personal ones; how many Claude Code sessions are running and an alert as soon as one of them waits for me. A Claude Code hook writes a status file per session, the scripts read those. The touch strip shows the work sessions that wait for input, named after the directory they run in, so I know which terminal to jump to without looking. The remaining two keys show the open tasks in my Paperclip instances.

imageCommand

Pretty much every custom key is an imageCommand widget. The script renders a 120x120 png (200x100 for a touch strip segment) with imagemagick and prints its path. Every image is rendered once per value and cached in /tmp, so polling once a second costs next to nothing. The core of the alerts key;

render() {
  local img="$CACHE/$1.png"
  shift
  if [ ! -f "$img" ]; then
    /usr/bin/magick -size 120x120 xc:black "$@" "$img.tmp.png" 2>/dev/null \
      && /usr/bin/mv "$img.tmp.png" "$img" || exit 1
  fi
  echo "$img"
}

render "$name" \
  \( "$ICON" -resize 120x120 -channel A -evaluate multiply 0.3 +channel \) \
  -gravity center -composite \
  -font "$FONT_BOLD" -fill "$color" -pointsize 64 -annotate +0+0 "$count"

Two things to keep in mind when writing those scripts; deckmaster runs them with a minimal PATH and without a locale. So use absolute paths everywhere, no ~, and export LC_ALL=C.UTF-8 if you want to draw nerd font glyphs with $''.

mini

The plus sits on my desk at work, the mini moved to my desk at home. My laptop travels between both, which is why the systemd units have to cope with a deck being plugged in and out all day. The mini has its own, simpler decks; a tux background, weather, date and time and a button to the next page with shortcuts and system info.

streamdeck mini

I'm pretty sure the decks will keep changing for a while, there is always another thing that would fit on a key ;) The configuration lives in ~/.config/deckmaster/, the fork on github. Feel free to comment if you built something similar with your Stream Deck!