I just hat a look into the batfetch bash-script.
On many places, you use /sys/class/power_supply/BAT*.
The BAT* (and also A* for "AC" adapters) assumes that there is maximum 1 battery and at maximum one external power supply present. But that is not always true. There exist machines with more than 1 battery; your script will produce garbage in this cases.
I think a solution would be to check which devices are there, and if it is more than one either make a seperate display for each, or per default display the lowest one, and in both cases allow the user to optionally specify which to use.
Regards!
I just hat a look into the
batfetchbash-script.On many places, you use
/sys/class/power_supply/BAT*.The
BAT*(and alsoA*for "AC" adapters) assumes that there is maximum 1 battery and at maximum one external power supply present. But that is not always true. There exist machines with more than 1 battery; your script will produce garbage in this cases.I think a solution would be to check which devices are there, and if it is more than one either make a seperate display for each, or per default display the lowest one, and in both cases allow the user to optionally specify which to use.
Regards!