From 80adf828d041fd30c2bfb584b2a1b12c53ad1a5a Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Fri, 2 Dec 2022 00:29:52 +0100 Subject: bash --- bash/10-spotify.profile | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 bash/10-spotify.profile (limited to 'bash/10-spotify.profile') diff --git a/bash/10-spotify.profile b/bash/10-spotify.profile new file mode 100644 index 0000000..33d0938 --- /dev/null +++ b/bash/10-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