Set battery charge limit (60/80/100) from the GNOME panel. This extension provides quick access to battery charge limits through the GNOME top bar. It requires the Battery Limit CLI tool to be installed separately. The extension invokes the CLI tool located at `/usr/local/bin/battery` and uses `pkexec` to securely request administrator privileges when changing battery charge thresholds. Installation instructions and releases are available at: https://github.com/aditya-git0503/battery-limit-cli
Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.
EGO-L-004 warning
main loop sources should be removed in disable()
Main loop sources assigned in `enable()` are missing matching removals in `disable()` or its helper methods.
extension.js:46
setTimeout(() => {
Main.notify("Battery Limit", `${text} applied successfully`);
}, 5000)
1. Please add GitHub or GitLab url to the `metadata.json`: [EGO Review Guidelines: url](https://gjs.guide/extensions/review-guidelines/review-guidelines.html#metadata-json-must-be-well-formed) 2. Remove unnecessary comment (line 40 `extension.js`). 3. What is the reason for the timeout (line 46 `extension.js`)? Even if there is a good reason for that, it should be removed on destroy and before creating a new one: [EGO Review Guidelines: Timeout](https://gjs.guide/extensions/review-guidelines/review-guidelines.html#remove-main-loop-sources) 4. As mentioned before, most users don't have that `/usr/local/bin/battery` installed on their system. At least you should mention in the description that how they can install that dependency. You can also add `donations` to the `metadata.json`, so people can donate to you if they want: [Extension Anatomy: donations](https://gjs.guide/extensions/overview/anatomy.html#donations) If you need any help with your extension you can ask us on: - [GNOME Extensions Matrix Channel](https://matrix.to/#/#extensions:gnome.org) - IRC Bridge: irc://irc.gimpnet.org/shell-extensions