Slimbook-Team / slimbookbattery

Slimbook Battery 4
https://slimbook.es/en/tutoriales/aplicaciones-slimbook/398-slimbook-battery-3-application-for-optimize-battery-of-your-laptop
GNU General Public License v3.0
252 stars 18 forks source link

Allow to configure the TLP options related to battery charge thresholds #126

Open pedroluislopez opened 11 months ago

pedroluislopez commented 11 months ago

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.