added wireless symbol to bar if wireless is connected
Signed-off-by: Miles Alan <m@milesalan.com>
This commit is contained in:
parent
435a1e74f1
commit
63d5ec3f7d
1 changed files with 8 additions and 1 deletions
|
@ -17,6 +17,13 @@ update() {
|
|||
CALLSECONDS="$(echo "$NOWS" - "$CALLSTARTS" | bc)"
|
||||
CALLINFO=" ${CALLSECONDS}s "
|
||||
fi
|
||||
|
||||
# W symbol if wireless is connect
|
||||
WIRELESS=""
|
||||
WLANSTATE="$(tr -d "\n" < /sys/class/net/wlan0/operstate)"
|
||||
if [ "$WLANSTATE" = "up" ]; then
|
||||
WIRELESS="W "
|
||||
fi
|
||||
|
||||
# M symbol if modem monitoring is on & modem present
|
||||
MODEMMON=""
|
||||
|
@ -42,7 +49,7 @@ update() {
|
|||
# Time
|
||||
TIME="$(date +%R)"
|
||||
|
||||
BAR="${CALLINFO}${MODEMMON}${VOL} ${BATSTATUS}${PCT}% ${TIME}"
|
||||
BAR="${CALLINFO}${MODEMMON}${WIRELESS}${VOL} ${BATSTATUS}${PCT}% ${TIME}"
|
||||
xsetroot -name "$BAR"
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue