aboutsummaryrefslogtreecommitdiff
path: root/Window_Manager/ratpoison/get_spotify_sink
diff options
context:
space:
mode:
authorVasil Zlatanov <v@skozl.com>2019-04-03 19:48:32 +0100
committerVasil Zlatanov <v@skozl.com>2019-04-03 19:48:32 +0100
commit5fed1e097d543abaf0b8726b21fc43e87e4526ad (patch)
treeaab3e7c6587619bb0015f9c07ab1edec1a83db05 /Window_Manager/ratpoison/get_spotify_sink
parentf62fb0f2ab09407803680364849e22ffe2eb6342 (diff)
parent9e057a7cdeb3eddbe842bf3e5902753e7b556e7b (diff)
downloaddotfiles-5fed1e097d543abaf0b8726b21fc43e87e4526ad.tar.gz
dotfiles-5fed1e097d543abaf0b8726b21fc43e87e4526ad.tar.bz2
dotfiles-5fed1e097d543abaf0b8726b21fc43e87e4526ad.zip
Merge branch 'master' of ssh://skozl.com:/srv/git/dotfiles
Diffstat (limited to 'Window_Manager/ratpoison/get_spotify_sink')
-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"'