aboutsummaryrefslogtreecommitdiff
path: root/Window_Manager/ratpoison
diff options
context:
space:
mode:
Diffstat (limited to 'Window_Manager/ratpoison')
-rwxr-xr-xWindow_Manager/ratpoison/get_spotify_sink4
1 files changed, 4 insertions, 0 deletions
diff --git a/Window_Manager/ratpoison/get_spotify_sink b/Window_Manager/ratpoison/get_spotify_sink
new file mode 100755
index 0000000..58ba5e9
--- /dev/null
+++ b/Window_Manager/ratpoison/get_spotify_sink
@@ -0,0 +1,4 @@
+#!/bin/sh
+pacmd list-sink-inputs |
+tr '\n' '\r' |
+perl -ne 's/ *index: ([0-9]+).+?application\.name = "([^\r]+)"\r.+?(?=index:|$)/\2:\1\r/g; print $1 if $2=="Spotify"'