aboutsummaryrefslogtreecommitdiff
path: root/bin/volume
blob: 3e22a2b103f2313a14d78e41848eb83fadbf9bef (plain) (blame)
1
2
3
4
5
6
7
8
#!/bin/bash
volumes=$(amixer get Master |grep % |awk '{print $5}'|sed 's/[^0-9]//g')
#avg=$(awk '{ print ($1+$2)/2 }' <(echo $volumes))
if [[ $1 == 'L' ]]; then
    echo "$(echo $volumes | cut -d' ' -f1)%"
else
    echo "$(echo $volumes | cut -d' ' -f2)%"
fi