From 9e057a7cdeb3eddbe842bf3e5902753e7b556e7b Mon Sep 17 00:00:00 2001 From: Vasil Zlatanov Date: Wed, 3 Apr 2019 00:59:03 +0100 Subject: Add script to get spotify sink number --- Window_Manager/ratpoison/get_spotify_sink | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 Window_Manager/ratpoison/get_spotify_sink (limited to 'Window_Manager/ratpoison') 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"' -- cgit v1.2.3-54-g00ecf