Review of "Battery Health Charging" version 5

Details Page Preview

Set battery charging threshold / charging limit / charging mode Battery Health Charging: An extension to maximize the battery life of laptops by setting their charging threshold or modes. Compatible with - Asus - LG - Samsung - Sony - Huawei - Toshiba - System76 - Lenovo (Ideapad, Legion) - Thinkpad - Panasonic - Acer (dependencies: kernel module) - MSI (dependencies: kernel module) - Tuxedo (dependencies: kernel module) - Slimbook (dependencies: kernel module) - Tuxedo IntelQC71 (dependencies: kernel module) - XMG IntelQC71 (dependencies: kernel module) - Eluktronics IntelQC71 (dependencies: kernel module) - Purism Librem (dependencies: kernel module) - Gigabyte Aero/Aorus (dependencies: kernel module) - Dell (dependencies: custom package libsmbios) - Dell (dependencies: custom package Dell Command Center) - Apple Macbook Intel-series chip (dependencies: kernel module) - Apple Macbook M-series chip (dependencies: custom kernel) - Razer (dependencies: custom package razer-cli) - Framework (dependencies: kernel module) Not all models are comaptible. Please read about the compatibility and dependencies of your device on github link below. https://maniacx.github.io/Battery-Health-Charging/

Extension Homepage
https://github.com/maniacx/Battery-Health-Charging

No comments.

Diff Against

Files

Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.

All Versions

Previous Reviews on this Version

maniacx posted a review
I have corrected the Highlighted issue with GLib.timeout's Each Glib.timeout has a different id and the are removed as soon as they exit and also removed them on disable extension. As far as script and spawn commands goes. there are a lot of spawn commands visible but maximum 4 are used A brief explaiation, I made this extension to control the charging-threshold of the laptop. Laptop currently supported are thinkpad, asus, samsung, sony, huwaei, lg, lenovo, acer, toshiba, appleIntelSMC, Some laptops require root permissions and some don't When the extension is enabled. 1. checkDeviceType() detects the type of laptop by checking sysfsfile for controlling threshold is present or not. schema@'device-type' If found device type is stored. 2. isDeviceAuthRequired() checks if this sysfs file need root to write on it or not and saved in schema@'root-mode' Once the type and mode is detected. If this extension is installed on thinkpad with dual battery, one mode change will echo 4 commands to change the threshold values battery 1 '/sys/class/power_supply/BAT0/charge_control_end_threshold'; battery 1 '/sys/class/power_supply/BAT0/charge_control_start_threshold'; battery 2 '/sys/class/power_supply/BAT1/charge_control_end_threshold'; battery 2 '/sys/class/power_supply/BAT1/charge_control_start_threshold'; maximum 4 commandline are used and it is only for this laptop with 2 battery which is also done in this extension https://extensions.gnome.org/extension/4798/thinkpad-battery-threshold/ Likewise if this extension is installed on thinkpad single battery, one mode change will echo 2 commands to change the threshold values '/sys/class/power_supply/BAT0/charge_control_end_threshold'; '/sys/class/power_supply/BAT0/charge_control_start_threshold'; maximum 2 commandline are used and it is only for this laptop Likewise if this extension is installed on asus, one mode change will echo 1 commands to change the threshold values '/sys/class/power_supply/BAT0/charge_control_end_threshold'; Similiar samsung, sony, huwaei, lg, lenovo, acer, toshiba, appleIntelSMC use only 1 commang to change the threshold values As you can see not all spawn commands are used. It is only uses selected command based on laptop type it is installed in. As for script, if root is need to change the threshold, user needs to install it. and remove it when removing the extension. installer.sh is used for this purpose and only used once. during first use of extension (if root is need) and when user decides to remove it. batteryhealthchargingctl is used to control the threshold in root-mode Honestly i used and sligthly modified both script from these two extension. https://extensions.gnome.org/extension/4372/shutdowntimer/ https://extensions.gnome.org/extension/945/cpu-power-manager/ I do not want to make an seperate app. It breaks usabilty. If there are other concerns please let me know. Oh. There is also another function that runs command through GLib subprocess cleanOutdatedFiles() My VERSION3 used systemd service to change permission of sysfsfile for controlling threshold so that the extension can modfy it. Now since I am using Polkit and not using systemd service, user who get automatically upgraded may not have a chances to uninstall the unused systemd service file. So i have embeded a fucntion to check if systemd service file exist. If exist it will notify to remove these unused systemd files. And if user clicks on remove file, it will use cleanOutdatedFiles() to remove them If this is too much, then I could delete cleanOutdatedFiles() function from this extension, and just send notification asking user to read github on how to remove these unused systemd service files. And i can mentioned steps on Github.
JustPerfection active
Approved. Thanks for the clarification. In case you want to separate it to an app: You can ask users to install the dependency in case the app wasn't installed. That's why we have rules for binaries and scripts installing from other sources: https://gjs.guide/extensions/review-guidelines/review-guidelines.html#scripts-and-binaries