Fix battery usage if the first battery doesn't begin with 0
This commit is contained in:
parent
4698baefd0
commit
3d7fd5bb5e
1 changed files with 1 additions and 1 deletions
2
fetch
2
fetch
|
@ -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 ;;
|
||||
|
|
Loading…
Reference in a new issue