aboutsummaryrefslogtreecommitdiff
path: root/Window_Manager
diff options
context:
space:
mode:
authorVasil Zlatanov <v@skozl.com>2019-04-03 00:59:03 +0100
committerVasil Zlatanov <v@skozl.com>2019-04-03 00:59:03 +0100
commit9e057a7cdeb3eddbe842bf3e5902753e7b556e7b (patch)
tree65fe1a59ac7d2f4922fd04a923afeaaf3b24ed83 /Window_Manager
parent2df2d13c153dbb69098053fa6aa3a5aaa7fed331 (diff)
downloaddotfiles-9e057a7cdeb3eddbe842bf3e5902753e7b556e7b.tar.gz
dotfiles-9e057a7cdeb3eddbe842bf3e5902753e7b556e7b.tar.bz2
dotfiles-9e057a7cdeb3eddbe842bf3e5902753e7b556e7b.zip
Add script to get spotify sink number
Diffstat (limited to 'Window_Manager')
-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"'