Review of "Shutdown Timer" version 38

Details Page Preview

Shutdown/reboot/suspend the device after a specific time or wake with a rtc alarm. The screen-saver will not interrupt the timer. A privileged control script may be installed to control shutdown and rtcwake as user.

Extension Homepage
https://github.com/Deminder/ShutdownTimer

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)

Shexli has not produced a result yet.

All Versions

Previous Reviews on this Version

JustPerfection rejected
1. Since you are enabling base on `this.disableTimestamp`, you should consider the racy disable too. So, it should be like this (`?` optional chaining): ```js this._tracker?.clearAll(); this._indicator?.destroy(); ``` 2. `dbus-service/main.js` should start with: ```js #!@GJS@ -m ``` TBH, all the `.sh` and gjs app scripts are too much for a GNOME Shell extension. at this point, I think they should be distributed via another medium, so this extension can use it as a dependency. https://gjs.guide/extensions/review-guidelines/review-guidelines.html#scripts-and-binaries
Deminder posted a review
> 1. Since you are enabling base on `this.disableTimestamp`, you should consider the racy disable too. I am not sure what you mean, here. The extension is fully enabled on `enable()` and fully disabled on `disable()`. The last disable time `this.disableTimestamp` is only used to reset the `shutdown-timestamp-value` setting. > 2. `dbus-service/main.js` should start with: `#!@GJS@ -m` Do you mean in `modules/menu-item.js` (line 576): `Exec=/usr/bin/gjs -m ...` should be `Exec=${GLib.find_program_in_path('gjs')} -m ...`? In GNOME Shell, `js/dbusServices/dbus-service.in` is started with `js/dbusServices/dbus-service.in` in a similar way. However, a shebang is not needed. > TBH, all the `.sh` and gjs app scripts are too much for a GNOME Shell extension. At this point, I think they should be distributed via another medium. I added a external gjs D-Bus service to let the check-command run uninterrupted (during first-unlock-dialog) since you did not permit the old behavior (of delayed disable). However, if keeping the check-command running is not an option, I would be ok with letting the check-command re-run. Would you, potentially, accept the extension if the external `or.gnome.Shell.Extensions.ShutdownTimer` D-Bus service installation is removed? - Remove `dbus-service/main.js` - Remove external systemd D-Bus service setup: `modules/menu-item.js` (line 570-611)
JustPerfection posted a review
We had a discussion about your extension on GNOME Shell extensions matrix room. We think you should avoid using complicated d-bus services. Please join us on GNOME Extensions Matrix room, we asked some questions there needs to be answered: https://matrix.to/#/#extensions:gnome.org