supergfxctl-gex is a gnome extension for supergfxctl (https://gitlab.com/asus-linux/supergfxctl).
Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.
Version | Status |
---|---|
33 | Active |
32 | Rejected |
31 | Rejected |
30 | Active |
29 | Inactive |
28 | Inactive |
27 | Rejected |
26 | Inactive |
25 | Inactive |
24 | Inactive |
23 | Rejected |
22 | Active |
21 | Inactive |
20 | Rejected |
19 | Rejected |
18 | Inactive |
17 | Inactive |
16 | Inactive |
15 | Inactive |
14 | Inactive |
13 | Inactive |
12 | Inactive |
11 | Inactive |
10 | Inactive |
9 | Inactive |
8 | Inactive |
7 | Inactive |
6 | Inactive |
5 | Inactive |
4 | Inactive |
3 | Rejected |
2 | Inactive |
1 | Inactive |
You can use your own helper, that was just a recommendation. btw, please add url to the metadata.json (as mentioned in version 1 review and hasn't been addressed yet).
Ah thanks for the hint. Will add that as well!
Okay I sorted out everything you mentioned, except the DI thingy. Could you eventually be so kind and show me an example of howto use DI in a GJS extension scope? (btw. sorry for my stupid questions, I was long time off from this project and must get things sorted out.. -.-)
The following had changed (v24 -> v27): - renamed panel43 to panel (including a GS version switch for the toggle initialization) - shifted some helpers out of the main file (to have a more structured code) - changed the main-extension initialization sequence, so the panel gets initialized in any case (this caused some trouble in the past)
1. Do not remove empty lines between functions and classes. That can make the review process harder, which is against our rules: https://gjs.guide/extensions/review-guidelines/review-guidelines.html#code-must-not-be-obfuscated 2. We have `misc.spawn()`. You can also use that instead of creating your own custom function: https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/a1cf24ba07b680482608b391b67babe731002a20/js/misc/util.js#L68 3. You are creating global in line 38 (extension.js) which is going to live there after disable. Just return instead of assigning it to any variable: ```js function init() { return new Extension(); } ```
I must say, that I'm a bit confused now. But for sure I'll adjust the code, but could you be so kind and give me some answers to the three points? 1. There weren't any emptylines in the past, could you please provide my a line-number where this happens? (I can't see a diffrence there to the versions below 27) 2. misc.spawn() is never used in this code. Do you mean the spawnCommandLine function (helpers), wich encapsulates the GLib.spawn_command_line_async() ? 3. Same as 1. this wasn't a problem in the past, is that a breaking change in GS 44? Maybe you can give me a hint on how I can access the extension instance then (or is it simply by using "Me")?
1. I just catch that since you've posted those 3 new files. For example, between line 9 and 10 (modules/panel.js) should have a new line. 2. Yes, as mentioned, you can use `misc.spawn()` instead of that helper function (just a recommendation though). 3. Missed that before. Use dependency injection for `gpuModeToggle`.
Some addition to the "misc.spawn()" command. I think we need to use misc.spawnCommandline(), but there seems to be a bug in GJS as it calls "trySpawn" instead of "trySpawnCommandline". see: https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/a1cf24ba07b680482608b391b67babe731002a20/js/misc/util.js#L84
What do you mean by bug? `trySpawn` is a function in that module which is doing `GLib.spawn_async()`
The misc.util also contains a function called "trySpawnCommandline" (see: https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/a1cf24ba07b680482608b391b67babe731002a20/js/misc/util.js#L158) which is not used inside the "spawnCommandline()" - as we need to spawn a commandline process.
line 20 extension.js should be: ```js this.quickToggles = new Panel.gpuModeToggle(this.gpuModeIndicator); ``` line 33 (modules/panel.js) inside `construct`: ```js constructor(gpuModeIndicator) { // .. this._gpuModeIndicator = gpuModeIndicator; } ``` Now you don't need to access global inside `setIndicator` (line 152 modules/panel.js): ```js setIndicator () { // replace all `sgfxctlExtension.gpuModeIndicator` with `this._gpuModeIndicator` // replace all `sgfxctlExtension.quickToggles._lastState` with `this._lastState` // replace all `sgfxctlExtension.quickToggles._powerState` with `this._powerState` } ``` I wrote everything in this box without testing it myself. so test it before sending the package here :p
Many thanks! I'll take a look on that and of course I'm doing some testings before pushing v28. Btw. do you guys have a matrix odr irc server? (so I can reach out some devs directly?) Nvm. Again, many thanks for your input. I really appreciate it! (and it helped me a lot)
Sure ;) - [GNOME Matrix Channel](https://matrix.to/#/#extensions:gnome.org) - IRC Bridge: irc://irc.gimpnet.org/shell-extensions