You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
499 B
21 lines
499 B
10 years ago
|
#!/bin/bash
|
||
|
|
||
|
source $(dirname $0)/config.sh
|
||
|
|
||
|
AMASTER=`amixer get Master | awk 'END{gsub(/\[|\]|%/,""); print $4}'`
|
||
|
ASTAT=`amixer get Master | awk 'END{gsub(/\[|\]|%/,""); print $6}'`
|
||
|
ICON=""
|
||
|
|
||
|
if [[ $ASTAT = "on" ]]; then
|
||
|
ICON="spkr_01.xbm"
|
||
|
PERCBAR=`echo "$AMASTER"\
|
||
|
| gdbar -bg $bar_bg -fg $bar_fg -h 1 -w 50`
|
||
|
else
|
||
|
ICON="spkr_02.xbm"
|
||
|
PERCBAR=`echo 0 \
|
||
|
| gdbar -bg $bar_bg -fg $bar_fg -h 1 -w 50`
|
||
|
fi
|
||
|
|
||
|
ICON='^i(/home/zubin/.xmonad/dzen2/'"$ICON)"
|
||
|
echo "$ICON $PERCBAR"
|