Advertisement
metalx1000

Bash Script Volume Control

Jan 21st, 2012
580
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.30 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. if [ "$1" ]
  4. then
  5.  let vol=$(amixer get Master|grep 'Mono:'| awk '{print $3}')
  6.  echo "$vol"
  7.  echo "$1"
  8.  let vol+=$1
  9.  echo "$vol"
  10.  
  11.  amixer cset iface=MIXER,name="Master Playback Volume" $vol >/dev/null
  12.  
  13. else
  14.  echo "please give value"
  15.  
  16.  echo "example: $0 1"
  17.  echo "example: $0 -1"
  18. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement