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=$(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}')
# fully-charged 🔌
@ -10,13 +10,13 @@ BSTATE=$(upower -i /org/freedesktop/UPower/devices/battery_BAT|grep state|awk '{
# discharging 🔋
case "$BSTATE" in
fully-charged)
STATE="🔌"
STATE="🔌 |"
;;
charging)
STATE="⚡"
STATE="⚡ |"
;;
discharging)
STATE="🔋 "
STATE="🔋 |"
;;
*)
STATE=""
@ -57,4 +57,4 @@ then
MTEXT=""
fi
echo "$MTEXT $WEATHER | $POWER $STATE | $DATE |"
echo "$MTEXT $WEATHER $POWER $STATE $DATE |"