aboutsummaryrefslogtreecommitdiff
path: root/bash/10-spotify.profile
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2022-12-02 00:29:52 +0100
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2022-12-02 00:29:52 +0100
commit80adf828d041fd30c2bfb584b2a1b12c53ad1a5a (patch)
treea9575dde9bfd14e0a0460681b5ce9f4290b13378 /bash/10-spotify.profile
parent57e29729801bf452f9b8b4de5966a39f59ad3f9f (diff)
downloaddotfiles-80adf828d041fd30c2bfb584b2a1b12c53ad1a5a.tar.gz
bash
Diffstat (limited to 'bash/10-spotify.profile')
-rw-r--r--bash/10-spotify.profile9
1 files changed, 9 insertions, 0 deletions
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