adjust statusbar display

This commit is contained in:
Morgan McMillian 2021-02-19 16:57:06 -08:00
parent 10e40b76af
commit 22a08c156e

View file

@ -2,7 +2,7 @@
#DATE=$(while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done) #DATE=$(while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done)
DATE=$(date +'%Y-%m-%d %k:%M') DATE=$(date +'%Y-%m-%d %k:%M')
POWER=$(upower -i /org/freedesktop/UPower/devices/battery_BAT|grep percentage|awk '{print $2}') POWER="| $(upower -i /org/freedesktop/UPower/devices/battery_BAT|grep percentage|awk '{print $2}')"
BSTATE=$(upower -i /org/freedesktop/UPower/devices/battery_BAT|grep state|awk '{print $2}') BSTATE=$(upower -i /org/freedesktop/UPower/devices/battery_BAT|grep state|awk '{print $2}')
# fully-charged 🔌 # fully-charged 🔌
@ -10,13 +10,13 @@ BSTATE=$(upower -i /org/freedesktop/UPower/devices/battery_BAT|grep state|awk '{
# discharging 🔋 # discharging 🔋
case "$BSTATE" in case "$BSTATE" in
fully-charged) fully-charged)
STATE="🔌" STATE="🔌 |"
;; ;;
charging) charging)
STATE="⚡" STATE="⚡ |"
;; ;;
discharging) discharging)
STATE="🔋 " STATE="🔋 |"
;; ;;
*) *)
STATE="" STATE=""
@ -57,4 +57,4 @@ then
MTEXT="" MTEXT=""
fi fi
echo "$MTEXT $WEATHER | $POWER $STATE | $DATE |" echo "$MTEXT $WEATHER $POWER $STATE $DATE |"