Permalink
Browse files

alsavol: set based on percentage

  • Loading branch information...
1 parent 8b98d13 commit c7d7f07696efb762797d459c703930e973953e2b @falconindy committed Apr 15, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 alsavol
View
@@ -17,7 +17,7 @@ setvol() {
local channel=$1 level=$2
(( $# == 2 )) || return 1
- amixer -q set "$channel" "$level"
+ amixer -q set "$channel" "$level%"
}
is_muted() {
@@ -83,7 +83,7 @@ increase() {
newvol=$(( curvol + increment ))
(( newvol > 100 )) && newvol=100
- setvol "$channel" "$(( curvol + increment ))"
+ setvol "$channel" "$(( newvol ))"
echo "$newvol"
}

0 comments on commit c7d7f07

Please sign in to comment.