Skip to content

Script will produce garbage when more than 1 battery or external power supply is present. #4

Description

@dreirund

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions