Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 17 lines (14 sloc) 795 Bytes
#!/bin/bash
if [[ "$(grep -A12 'Speaker Phantom' /proc/asound/card0/codec#0\
| grep 'Pin\-ctls' | cut -d ':' -f3)" != "" ]]; then
how_loud=`amixer get Speaker | grep "%" | cut -d [ -f2 | cut -d ] -f1 | uniq`the_amp=`amixer get Pre-Amp | grep "%" | cut -d [ -f2 | cut -d ] -f1 | uniq`
else
how_loud=`amixer get Headphone | grep "%" | cut -d [ -f2 | cut -d ] -f1 | uniq`
fi
the_amp=`amixer get Pre-Amp | grep "%" | cut -d [ -f2 | cut -d ] -f1 | uniq`
# echo $how_loud | dbar -w 60 -s '|' -min 0 -max 100 | dzen2 -p 4 -fg green -x 350 -y 384 -w 600
echo $how_loud | gdbar -fg '#99ccdd' -bg blue -h 7 -w 400 | dzen2 -p 4 -bg gray10 -x 420 -y 700 -w 450 &
echo $the_amp | gdbar -fg '#99ccdd' -bg blue -h 7 -w 400 | dzen2 -p 4 -bg gray10 -x 420 -y 720 -w 450
how_loud=""
the_amp=""
exit 0