diff --git a/dotfiles/lib/shellenv/linux.sh b/dotfiles/lib/shellenv/linux.sh index 3c1e4413..650bda86 100644 --- a/dotfiles/lib/shellenv/linux.sh +++ b/dotfiles/lib/shellenv/linux.sh @@ -1 +1,6 @@ command_exists 'open' || command_exists 'xdg-open' && alias open='xdg-open' + +pavolume () { + pactl list sinks | grep '^[[:space:]]Volume:' | \ + head -n $(( $SINK + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' +}