detect the correct battery object

This commit is contained in:
Morgan McMillian 2021-04-07 12:50:24 -07:00
parent 54925edca1
commit fa9a7c9429

View file

@ -2,8 +2,9 @@
#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}')"
BSTATE=$(upower -i /org/freedesktop/UPower/devices/battery_BAT|grep state|awk '{print $2}')
BATTERY=$(upower --enumerate|grep battery)
POWER="| $(upower -i $BATTERY|grep percentage|awk '{print $2}')"
BSTATE=$(upower -i $BATTERY|grep state|awk '{print $2}')
# fully-charged 🔌
# charging ⚡