Review of "Battery Limit" version 2

Details Page Preview

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

Extension Homepage
https://github.com/aditya-git0503/battery-limit-cli

No comments.

Diff Against

Files

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

Shexli (experimental) warning 1

Shexli found 1 issue that may need reviewer attention.

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.

Remove main loop sources

  • extension.js:46
                    setTimeout(() => {
                        Main.notify("Battery Limit", `${text} applied successfully`);
                    }, 5000)

All Versions

Version Status
3 Active
2 Rejected
1 Rejected

Previous Reviews on this Version

JustPerfection rejected
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