|
|
@ -81,15 +81,15 @@ update() { |
|
|
|
# Volume |
|
|
|
# Volume |
|
|
|
AUDIODEV="$(sxmo_audiocurrentdevice.sh)" |
|
|
|
AUDIODEV="$(sxmo_audiocurrentdevice.sh)" |
|
|
|
AUDIOSYMBOL=$(echo "$AUDIODEV" | cut -c1) |
|
|
|
AUDIOSYMBOL=$(echo "$AUDIODEV" | cut -c1) |
|
|
|
if [ "$AUDIOSYMBOL" = "L" ]; then |
|
|
|
if [ "$AUDIOSYMBOL" = "L" ] || [ "$AUDIOSYMBOL" = "N" ]; then |
|
|
|
AUDIOSYMBOL="" #speakers, use no special symbol |
|
|
|
AUDIOSYMBOL="" #speakers or none, use no special symbol |
|
|
|
elif [ "$AUDIOSYMBOL" = "H" ]; then |
|
|
|
elif [ "$AUDIOSYMBOL" = "H" ]; then |
|
|
|
AUDIOSYMBOL=" " |
|
|
|
AUDIOSYMBOL=" " |
|
|
|
elif [ "$AUDIOSYMBOL" = "E" ]; then |
|
|
|
elif [ "$AUDIOSYMBOL" = "E" ]; then |
|
|
|
AUDIOSYMBOL=" " #earpiece |
|
|
|
AUDIOSYMBOL=" " #earpiece |
|
|
|
fi |
|
|
|
fi |
|
|
|
VOL=0 |
|
|
|
VOL=0 |
|
|
|
[ "$AUDIODEV" = "None" ] && AUDIOSYMBOL="ﱝ" || VOL="$( |
|
|
|
[ "$AUDIODEV" = "None" ] || VOL="$( |
|
|
|
amixer sget "$AUDIODEV" | |
|
|
|
amixer sget "$AUDIODEV" | |
|
|
|
grep -oE '([0-9]+)%' | |
|
|
|
grep -oE '([0-9]+)%' | |
|
|
|
tr -d ' %' | |
|
|
|
tr -d ' %' | |
|
|
@ -98,19 +98,19 @@ update() { |
|
|
|
)" |
|
|
|
)" |
|
|
|
if [ "$AUDIODEV" != "None" ]; then |
|
|
|
if [ "$AUDIODEV" != "None" ]; then |
|
|
|
if [ "$VOL" -eq 0 ]; then |
|
|
|
if [ "$VOL" -eq 0 ]; then |
|
|
|
AUDIOSYMBOL="$AUDIOSYMBOLﱝ" |
|
|
|
VOLUMESYMBOL="ﱝ" |
|
|
|
elif [ "$VOL" -lt 25 ]; then |
|
|
|
elif [ "$VOL" -lt 25 ]; then |
|
|
|
AUDIOSYMBOL="$AUDIOSYMBOL奄" |
|
|
|
VOLUMESYMBOL="奄" |
|
|
|
elif [ "$VOL" -gt 75 ]; then |
|
|
|
elif [ "$VOL" -gt 75 ]; then |
|
|
|
AUDIOSYMBOL="$AUDIOSYMBOL墳" |
|
|
|
VOLUMESYMBOL="墳" |
|
|
|
else |
|
|
|
else |
|
|
|
AUDIOSYMBOL="$AUDIOSYMBOL奔" |
|
|
|
VOLUMESYMBOL="奔" |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
# Time |
|
|
|
# Time |
|
|
|
TIME="$(date +%R)" |
|
|
|
TIME="$(date +%R)" |
|
|
|
|
|
|
|
|
|
|
|
BAR="${CALLINFO}${MODEMMON}${WIRELESS} ${AUDIOSYMBOL} ${BATSTATUS} ${TIME}" |
|
|
|
BAR="${CALLINFO} ${MODEMMON} ${WIRELESS} ${AUDIOSYMBOL}${VOLUMESYMBOL} ${BATSTATUS} ${TIME}" |
|
|
|
xsetroot -name "$BAR" |
|
|
|
xsetroot -name "$BAR" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|