Mindful productivity companion with screen time tracking, Pomodoro focus timer, weekly stats with visual graphs, and ambient zen music. Track your active screen time, maintain focus with timed sessions, and create a balanced digital lifestyle. Note: Screen time tracking may take a few minutes to initialize on first install. Music streaming requires the mpv media player.
Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.
EGO-X-004 warning
extensions should avoid synchronous file IO in shell code
Shell code should avoid synchronous file IO APIs like `GLib.file_get_contents()` and `Gio.File.load_contents()`.
extension.js:164
GLib.file_get_contents('/proc/sys/kernel/random/boot_id')
extension.js:174
GLib.file_get_contents(this._heartbeatPath)
EGO-L-003 warning
signals connected by extension should be disconnected in disable()
Signals assigned in `enable()` are missing matching disconnect calls in `disable()` or its helper methods.
extension.js:626
this.menu.connect('open-state-changed', (_menu, open) => {
if (open) {
if (this._menuOpenIdleId) {
GLib.Source.remove(this._menuOpenIdleId);
this._menuOpenIdleId = null;
}
// Defer updates to
1. `this._destroyed` is a bad practice. Please remove that. If you want to cancel all subprocess on disable/destroy you should use cancellable. 2. Please use `connectObject()` and `disconnectObject()` so it is easier to track for cleanup. 3. You shouldn't spawn to check whether an app is installed (line 1473 `extension.js`): ```js GLib.find_program_in_path("mpv"); ``` 4. Avoid sending users notifications with `sudo apt/dnf install mpv`. Just mentioning to install mpv would be fine. 5. Please use aysnc for reading file content since you are in shell process (line 164, 174 `extension.js`): [Gio.File.load_contents_async](https://gjs-docs.gnome.org/gio20~2.0/gio.file#method-load_contents_async)
Thanks for the detailed review. I've pushed a new version with all of these addressed: - Removed the _destroyed flag. All async file reads and subprocess calls now take a Gio.Cancellable that is cancelled in destroy(). - Switched the settings and menu signals to connectObject() / disconnectObject(). This also fixes the previously leaked open-state-changed handler. - Replaced the which mpv subprocess with GLib.find_program_in_path('mpv'), checked up front before playback. - Reworded the mpv notification so it just asks the user to install mpv, with no distro install commands. Also removed those from the store description. - The boot id and heartbeat files are now read with load_contents_async(). Two notes on things that remain by design, happy to change if you'd prefer: - The heartbeat file (a ~100 byte state file) is still written with GLib.file_set_contents(). The write on destroy() has to be synchronous so the clean-stop marker is persisted before teardown, and the periodic write is a tiny atomic file. Only the reads were on a hot path, and those are now async. - There is one remaining subprocess, journalctl --list-boots, run once per boot. It's read-only and is the only way an extension can tell that the machine was powered off during a period the GNOME session history wrongly records as active (gnome-shell#8289). It's fully guarded; any failure is caught and the feature just degrades. Thanks again.
Hello, Can you kindly check the one I submitted later? Thanks.