From f7422dc4209372c092783d9ba58fe1c56923237f Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Sat, 28 Aug 2021 15:40:48 +0200 Subject: bash: spotify sink --- bash/spotify.profile | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 bash/spotify.profile (limited to 'bash/spotify.profile') diff --git a/bash/spotify.profile b/bash/spotify.profile new file mode 100644 index 0000000..33d0938 --- /dev/null +++ b/bash/spotify.profile @@ -0,0 +1,9 @@ +#!/bin/bash + +SPOTIFY_OUTPUT_REGEX="BurrBrown" + +while read -r NUM NAME REST; do + [[ "$NAME" =~ $SPOTIFY_OUTPUT_REGEX ]] && SPOTIFY_SINK=$NUM +done <<< "$(pactl list short sinks)" + +export SPOTIFY_SINK -- cgit v1.2.3