aboutsummaryrefslogtreecommitdiff
path: root/Window_Manager/ratpoison/get_spotify_sink
blob: 58ba5e9a45208e14b97a22e58839eefe0481e7a2 (plain)
1
2
3
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"'