Fix status bar icon spaces

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
master
Stacy Harper 4 years ago committed by Maarten van Gompel
parent cf876823fb
commit 18009c8378
  1. 16
      scripts/core/sxmo_statusbar.sh

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

Loading…
Cancel
Save