Merge branch 'master' of github.com:IvanMalison/dotfiles

This commit is contained in:
Ivan Malison 2017-03-18 11:44:22 -07:00
commit 79d8fb132f
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -4,7 +4,13 @@ pasink () {
pacmd list-sinks | grep '* index' | get_cols ' -1'
}
pavolume () {
pactl list sinks | grep '^[[:space:]]Volume:' | \
head -n $(( $(pasink) + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,'
pasink() {
pacmd stat | awk -F": " '/^Default sink name: /{print $2}'
}
pavolume () {
pacmd list-sinks |
awk '/^\s+name: /{indefault = $2 == "<'$(pasink)'>"}
/^\s+volume: / && indefault {print $5; exit}'
}