Skip to content

Battery status not working when more than 1 laptop battery exists #415

@spez1998

Description

@spez1998

PROBLEM:
On laptops with more than 1 battery (e.g. Thinkpad T480), get_battery() function inside tools.py will not populate battery info as battery_count = len(glob.glob("/sys/class/power_supply/BAT*")) will always evaluate as >1 and if battery_count <= 1: branch is never entered.

Potential solutions:

  1. Provide users with the option to select which battery to display capacity of. Perhaps functionality can exist to show the next battery's capacity when the default battery runs to 0%.
  2. Automatically display the currently discharging battery's power. This information is available via /sys/class/power_supply/BAT*/status.

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