Enable/Disable battery threshold on Lenovo Thinkpad laptops. If you mainly use the system with the AC power adapter connected and only use the battery sporadically, you can increase battery life by setting the maximum charge value to less than 100%. This is useful because batteries that are used sporadically have a longer lifespan when kept at less than full charge.
Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.
Version | Status |
---|---|
49 | Active |
48 | Active |
47 | Active |
46 | Inactive |
45 | Active |
44 | Active |
43 | Active |
42 | Active |
41 | Active |
40 | Active |
39 | Active |
38 | Active |
37 | Active |
36 | Active |
35 | Rejected |
34 | Active |
33 | Active |
32 | Active |
31 | Active |
30 | Active |
29 | Active |
28 | Active |
27 | Active |
26 | Active |
25 | Active |
24 | Active |
23 | Active |
22 | Active |
21 | Active |
20 | Active |
19 | Active |
18 | Active |
17 | Active |
16 | Active |
15 | Active |
14 | Inactive |
13 | Active |
12 | Inactive |
11 | Active |
10 | Active |
9 | Active |
8 | Active |
7 | Active |
6 | Active |
5 | Active |
4 | Inactive |
3 | Inactive |
2 | Inactive |
1 | Inactive |
1. `GLib.idle_add()` is racy for getting prefs widget window. You can use `realize` which is still racy but much less racy: https://gjs.guide/extensions/upgrading/gnome-shell-40.html#get-prefs-window-and-resize-it You can get window in GNOME Shell 42 easier though. 2. If you add these to the metadata.json file you don't need to use any paramters for `ExtensionUtils.getSettings()` and `ExtensionUtils.initTranslation()`: ```json "settings-schema": "org.gnome.shell.extensions.lock-screen-message", "gettext-domain": "thinkpad-battery-threshold@marcosdalvarez.org", ``` 3. Remove unused imports in extension.js: - Lang (line 36) - Gtk (line 31) 4. Fix those indentations. You used both white space and tab. It makes the code hard to follow. 5. Please remove those logs or just make them available on debug mode: https://gjs.guide/extensions/review-guidelines/review-guidelines.html#no-excessive-logging If you need any help with your extension you can ask us on: - [GNOME Matrix Channel](https://matrix.to/#/#extensions:gnome.org) - IRC Bridge: irc://irc.gimpnet.org/shell-extensions