01 #!/bin/bash 02 AUDIODEV=hw:0 03 arg="$1" 04 case $arg in 05  "power") 06  zbarcam --nodisplay -Sdisable -Sqrcode.enable --prescale=320x240 /dev/video0 | /home/pi/rbar.sh 07  ;; 08  "next") 09  echo "Next Song" 10  xmms2 next 11  ;; 12  "prev") 13  echo "Previous Song" 14  xmms2 prev 15  ;; 16  "volup") 17  echo "volume 5 up" 18  xmms2 server volume +5 19  ;; 20  "voldown") 21  echo "volume 5 down" 22  xmms2 server volume -5 23  ;; 24  "play") 25  echo "toggle playback" 26  xmms2 toggle 27  status=$(xmms2 current) 28  if [[ "$status" =~ ^Paused ]]; then 29  play -q /home/pi/no.wav 30  fi 31  ;; 32 esac