Fix battery usage if the first battery doesn't begin with 0

This commit is contained in:
Dylan 2016-02-26 00:23:54 +11:00
parent 4698baefd0
commit 3d7fd5bb5e

2
fetch
View file

@ -1343,7 +1343,7 @@ getdisk () {
getbattery () {
case "$os" in
"Linux")
if [ -d "/sys/class/power_supply/BAT0" ]; then
if [ -d "/sys/class/power_supply" ]; then
# Set the index to the battery number.
case "$battery_num" in
"all") battery_num="*" index=0 ;;