Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hide battery symbol when not charging
When charging thresholds for battery health are set (e.g. on ThinkPads, the default is never to charge when battery level is at least 96%) it is common for the battery to be neither charging nor discharging, while not having 100% charge. Which lead to the green charging symbol being always displayed. Example output, in given ThinkPad scenario: ``` $ sudo tlp-stat --battery --- TLP 1.2.2 -------------------------------------------- +++ Battery Features: Charge Thresholds and Recalibrate natacpi = inactive (no kernel support) tpacpi-bat = active (thresholds, recalibrate) tp-smapi = inactive (ThinkPad not supported) +++ ThinkPad Battery Status: BAT0 (Main / Internal) /sys/class/power_supply/BAT0/manufacturer = SMP /sys/class/power_supply/BAT0/model_name = LNV-45N1 /sys/class/power_supply/BAT0/cycle_count = (not supported) /sys/class/power_supply/BAT0/energy_full_design = 56250 [mWh] /sys/class/power_supply/BAT0/energy_full = 43670 [mWh] /sys/class/power_supply/BAT0/energy_now = 43610 [mWh] /sys/class/power_supply/BAT0/power_now = 0 [mW] /sys/class/power_supply/BAT0/status = Not charging (threshold effective) tpacpi-bat.BAT0.startThreshold = 96 [%] tpacpi-bat.BAT0.stopThreshold = 100 [%] tpacpi-bat.BAT0.forceDischarge = 0 Charge = 99.9 [%] Capacity = 77.6 [%] $ acpi Battery 0: Not charging, 99% ```
- Loading branch information