Add or override the brightness slider to change the brightness via an alpha layer (and optionally stop using or cooperate with the exising backlight, if present). Either internal, external or all monitors can be dimmed. See the GitHub page for details. Note that this extension will keep running on the lock screen, as you'd also want the brightness setting to apply to the lock screen as well. Please report on GitHub if this gives you any trouble. This extension is a fork of the original 'Soft brightness' extension, and maintains support for new GNOME releases.
Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.
Version | Status |
---|---|
21 | Active |
20 | Rejected |
19 | Active |
18 | Active |
17 | Rejected |
16 | Active |
15 | Inactive |
14 | Active |
13 | Inactive |
12 | Rejected |
11 | Active |
10 | Rejected |
9 | Rejected |
8 | Rejected |
7 | Rejected |
6 | Rejected |
5 | Active |
4 | Rejected |
3 | Rejected |
2 | Rejected |
1 | Inactive |
1. Don't use `var`. Use `let` and `const` instead. Use `export class` when you want to export class. 2. Please remove line 30 (prefs.js). Not needed. 3. You cannot use both `getPreferencesWidget()` and `fillPreferencesWindow()` for the default class you are exporting in prefs.js. 4. Move line 34-35 (extension.js) to enable and null them out in disable: https://gjs.guide/extensions/review-guidelines/review-guidelines.html#destroy-all-objects 5. Making the default class you are exporting very large can make it harder to review (extension.js). because we need to make sure everything there getting null out. please make it a separate class if it's possible. 6. Timeouts should be removed on disable (line 154, 170 extension.js): https://gjs.guide/extensions/review-guidelines/review-guidelines.html#remove-main-loop-sources 7. Extensions cannot use `run_dispose()` (line 116 extension.js): > This function should only be called from object system implementations. https://gjs-docs.gnome.org/gobject20~2.0/gobject.object#method-run_dispose 8. Don't use `imports` (line 17-41 logger.js). 9. Use `console.*` instead of `log()`: https://gjs.guide/extensions/upgrading/gnome-shell-45.html#logging
(1) Done. (2-3) Extending a class, overriding methods, and making use of parent implementations all seem like perfectly good OOP. Could you explain your thoughts here? (4) Oh, these aren't even being used anymore. I will remove them. (5) I realize this. I am not the original author, and I definitely plan to do some refactoring, but I think getting GNOME 45 support working should be the priority here. (And also from a code review perspective, refactoring should preferably be looked at in a separate review.) What do you think? (6) Actually, it is. _clearDelayedSetPointerInvibleCallbacks() is called in disable() via a few intermediary functions. (7) Sure, we can remove this. (8) Oops. I wonder how that was working (or if it was). (9) Done.