Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
SINK_COUNT=$(pactl list short sinks | wc -l)
running=$(pactl list short sinks | grep "RUNNING")
running_ID=$(echo -n $running | awk '{print $1}')
new_ID=$(( ($running_ID + 1) % $SINK_COUNT))
pactl set-default-sink $new_ID

Keybase proof

I hereby claim:

  • I am ventos on github.
  • I am ventos (https://keybase.io/ventos) on keybase.
  • I have a public key whose fingerprint is A3DE 04BF C8C4 FF7A 3576 9AA2 5CE8 BB66 DA5D E53B

To claim this, I am signing this object: