Slimbook-Team/slimbookbattery

Allow to configure the TLP options related to battery charge thresholds

Opened this issue · 0 comments

Is your feature request related to a problem? Please describe.
I would like to configure the TLP options related to battery charge thresholds: START/STOP_CHARGE_THRESH_BATx

Finally, I have configured it using a file in the etc folder.

$ cat /etc/tlp.d/10-bat-thresh.conf 
START_CHARGE_THRESH_BAT0=75
STOP_CHARGE_THRESH_BAT0=80

Describe the solution you'd like
New options to configure the battery charge thresholds in the section "Battery", other option to configure "RESTORE_THRESHOLDS_ON_BAT", and finally two buttons to allow execute tlp fullcharge and tlp recalibrate.

Expected behavior:

$ sudo tlp-stat
...
/sys/class/power_supply/BAT0/status                         = Not charging

/sys/class/power_supply/BAT0/charge_control_start_threshold =     75 [%]
/sys/class/power_supply/BAT0/charge_control_end_threshold   =     80 [%]
/sys/class/power_supply/BAT0/charge_behaviour               = [auto] inhibit-charge force-discharge

Charge                                                      =   95.8 [%]
Capacity                                                    =  100.0 [%]

Describe alternatives you've considered
Configure it by hand.