#!/bin/bash

# omarchy:summary=Stream voxtype --follow status as bar-friendly JSON

if omarchy-cmd-missing voxtype; then
  echo '{"alt": "", "class": "idle", "tooltip": ""}'
  exit 0
fi

# Keep the status follower as the direct child of the bar. Quickshell
# clean up their direct child when they restart; a shell pipeline/coproc would
# leave `voxtype status --follow` orphaned under the user systemd instance.
exec setpriv --pdeathsig TERM voxtype status --follow --extended --format json
