[Linux] Add rofi_select_input.sh

This commit is contained in:
Ivan Malison 2017-03-29 19:50:25 -07:00
parent dda42e66c7
commit de0671026a
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -0,0 +1,9 @@
#!/usr/bin/env sh
inputs=$(pactl list sink-inputs | grep 'Sink Input' | grep -Eo '[0-9]*')
selection=$(echo "$inputs" | rofi -dmenu -i)
echo "$inputs" | xargs -I {} -n1 pactl set-sink-input-mute {} 1
pactl set-sink-input-mute "$selection" 0