detect the correct battery object
This commit is contained in:
parent
54925edca1
commit
fa9a7c9429
1 changed files with 3 additions and 2 deletions
|
@ -2,8 +2,9 @@
|
||||||
|
|
||||||
#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}')"
|
BATTERY=$(upower --enumerate|grep battery)
|
||||||
BSTATE=$(upower -i /org/freedesktop/UPower/devices/battery_BAT|grep state|awk '{print $2}')
|
POWER="| $(upower -i $BATTERY|grep percentage|awk '{print $2}')"
|
||||||
|
BSTATE=$(upower -i $BATTERY|grep state|awk '{print $2}')
|
||||||
|
|
||||||
# fully-charged 🔌
|
# fully-charged 🔌
|
||||||
# charging ⚡
|
# charging ⚡
|
||||||
|
|
Loading…
Reference in a new issue