aboutsummaryrefslogtreecommitdiff
path: root/bash/spotify.profile
diff options
context:
space:
mode:
Diffstat (limited to 'bash/spotify.profile')
-rw-r--r--bash/spotify.profile9
1 files changed, 9 insertions, 0 deletions
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