Review of "Yet Another Window Session Manager" version 2

Details Page Preview

Close open windows gracefully and save them as a session. And you can restore them when necessary manually or automatically at startup. Most importantly, it supports both X11 and Wayland! Main features: - Restore the previous session at startup. disabled by default. - Save running apps and windows automatically when necessary, this will be used to restore the previous session at startup. - Close running apps and windows automatically before Log Out, Restart, Power Off. disabled by default. - Close running windows gracefully - Close apps with multiple windows gracefully via ydotool so you don't lose sessions of this app (See also: How to make Close by rules work) - Save running apps and windows manually - Restore a selected session at startup (See also: #9). disabled by default. - Restore a saved session manually - Restore window state, including Always on Top, Always on Visible Workspace and maximization - Restore window workspace, size and position - Restore 2 column window tiling - Stash all supported window states so that those states will be restored after gnome shell restarts via Alt+F2 -> r or killall -3 gnome-shell. - Move windows to their own workspace according to a saved session - Support multi-monitor - Remove saved session to trash - Search saved session by the session name fuzzily For more information, please visit https://github.com/mendres82/gnome-shell-extension-yet-another-window-session-manager/blob/feature-close-save-session-while-logout/README.md. Please report issues on Github.

Extension Homepage
https://github.com/mendres82/gnome-shell-extension-yet-another-window-session-manager

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) error 1 warning 4

Shexli found 5 issues that may need reviewer attention.

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()`.

File Operations

  • moveSession.js:50
    session_file.load_contents(null)
  • openWindowsTracker.js:260
    sessionPathFile.load_contents(null)
  • openWindowsTracker.js:436
    FileUtils.current_extension_dir.get_child('dbus-interfaces').get_child('org.gnome.SessionManager.EndSessionDialog.xml').load_contents(null)
  • restoreSession.js:89
    session_file.load_contents(null)
  • ui/autostart.js:38
    FileUtils.current_extension_dir.get_child('dbus-interfaces').get_child('org.gnome.Shell.Extensions.yawsm.Autostart.xml').load_contents(null)
  • utils/WindowPicker.js:36
    FileUtils.current_extension_dir.get_child('dbus-interfaces').get_child('org.gnome.Shell.Extensions.yawsm.PickWindow.xml').load_contents(null)
  • utils/fileUtils.js:329
    desktop_template_file.load_contents(cancellable)

EGO-C49-004 error

extensions targeting GNOME 49 must not call Meta.Window.get_maximized

This extension explicitly targets GNOME Shell 49 but still calls removed `Meta.Window.get_maximized()`.

Meta.Window

  • moveSession.js:349
    metaWindow.get_maximized()
  • moveSession.js:387
    metaWindow.get_maximized()
  • saveSession.js:297
    metaWindow.get_maximized()

EGO-P-006 warning

unnecessary build and translation artifacts should not be shipped

Compiled GSettings schemas should not be shipped for 45+ packages.

Don't include unnecessary files

  • schemas/gschemas.compiled
    schemas/gschemas.compiled

EGO-L-005 warning

owned object references should be released in disable()

Owned references that are cleaned up in `disable()` should also be released with `null` or `undefined`.

Destroy all objects

  • ui/autostart.js:114
    this._settings = PrefsUtils.getSettings()
  • ui/autostart.js:244
    this._settings = PrefsUtils.getSettings()

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.

Disconnect all signals

  • ui/autoclose.js:375
    this._appStateChangedId = this._defaultAppSystem.connect('app-state-changed', this._appStateChanged.bind(this))
  • ui/autoclose.js:493
                this._initialKeyFocusDestroyId = actor.connect('destroy', () => {
                    this._initialKeyFocus = null;
                    this._initialKeyFocusDestroyId = 0;
                })
  • ui/autoclose.js:381
                this._overViewHidingId = Main.overview.connect('hidden', () => {
                    this.showAndUpdateState();
                })
  • ui/autoclose.js:378
                this._overViewShowingId = Main.overview.connect('showing', () => {
                    this.close();
                })
  • ui/autoclose.js:292
    this._draggable.connect('drag-begin', this._onDragBegin.bind(this))
  • ui/autoclose.js:293
    this._draggable.connect('drag-cancelled', this._onDragCancelled.bind(this))
  • ui/autoclose.js:294
    this._draggable.connect('drag-end', this._onDragEnd.bind(this))
  • ui/popupMenuButtonItems.js:157
                this._timeline.connect('completed', () => {
                    this._timeline.stop();
                    this.closingLabel.hide();
                })
  • ui/popupMenuButtonItems.js:153
                this._timeline.connect('new-frame', (_timeline, _frame) => {
                    this.closingLabel.show();
                })
  • ui/popupMenuButtonItems.js:164
            this.noButton.connect('clicked', () => {
                this._hideConfirm();
            })
  • ui/popupMenuButtonItems.js:139
            this.yesButton.connect('clicked', () => {
                // TODO Do this when enable_close_by_rules is true? 
                this._parent.close();
                if (Main.overview.visible) {
                    Main.overview.toggle();
                }
    
                RestoreSession.restoreSessionObject.restori
  • ui/popupMenuButtonItems.js:254
            this.noButton.connect('clicked', () => {
                // clear entry
                this.saveCurrentSessionEntry.set_text('');
                this.saveCurrentSessionEntry.hide();
                super.hideYesAndNoButtons();
            })
  • ui/popupMenuButtonItems.js:306
    clutterText.connect('activate', this._onTextActivate.bind(this))
  • ui/popupMenuButtonItems.js:253
    this.yesButton.connect('clicked', this._onClickedYes.bind(this))

All Versions

Version Status
2 Unreviewed
1 Rejected