Review of "Window Control" version 11 (1)

Details Page Preview

Exposes a D-Bus interface for listing and controlling windows, so scripts and applications can do on Wayland what wmctrl does on X11. List open windows with their ID, title, WM class, PID, workspace, monitor and geometry. Activate or focus a window by ID, title, WM class or PID. Move, resize, minimize, maximize, fullscreen, set above, set sticky or close a window. Tile the focused window to a 4x2 grid with Super+Ctrl and a numpad key. Every shortcut is a GSettings key that you can rebind or unbind. Place new windows automatically with rules in ~/.config/gnome-window-control/rules.json. The extension creates that directory, reads the file and never writes it. Without the file no window is placed. The extension has no preferences window and adds nothing to the panel. It registers the D-Bus object /org/gnome/Shell/Extensions/WindowControl on the org.gnome.Shell bus name. When you disable the extension, the D-Bus object, the shortcuts and the automatic placement stop; rules.json stays. IMPORTANT: the interface has no access control. Any application in your session can call it to read window titles and to control your windows. This is necessary for the intended use from shell scripts. Do not enable the extension if that is not acceptable to you. A command-line client, wctl, is available from the project page. It is not part of this extension and is not installed with it.

Extension Homepage
https://github.com/carlo9890/gnome-window-control

No comments.

FAQ

Files

Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.

Shexli (experimental) error 2 warning 2

Shexli found 4 issues that may need reviewer attention.

EGO-A-004 warning

extension files should not contain excessive ungated console logging

File contains 21 ungated console.log/warn/error calls (threshold: 5).

No excessive logging

  • extension.js:264
    console.error(`[Window Control] ${label}() error: ${e.message}`)
  • extension.js:354
    console.error(`[Window Control] ${label}() error: ${e.message}`)
  • extension.js:377
    console.error(`[Window Control] ${label} error: ${e.message}`)
  • extension.js:406
    console.error(`[Window Control] List() error: ${e.message}`)
  • extension.js:461
    console.error(`[Window Control] ListDetailed() error: ${e.message}`)
  • extension.js:493
    console.error(`[Window Control] ListMonitors() error: ${e.message}`)
  • extension.js:551
    console.error(`[Window Control] GetFocused() error: ${e.message}`)
  • extension.js:613
    console.error(`[Window Control] GetGeometry() error: ${e.message}`)
  • extension.js:652
    console.error(`[Window Control] GetWorkarea() error: ${e.message}`)
  • extension.js:692
    console.error(`[Window Control] ListWorkspaces() error: ${e.message}`)

EGO-C49-003 error

extensions targeting GNOME 49 must not call maximize or unmaximize with Meta.MaximizeFlags

This extension explicitly targets GNOME Shell 49 but still passes `Meta.MaximizeFlags` to `maximize()` or `unmaximize()`.

Meta.Window

  • extension.js:89
    win.maximize(Meta.MaximizeFlags.BOTH)
  • extension.js:97
    win.unmaximize(Meta.MaximizeFlags.BOTH)

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

  • extension.js:78
    win.get_maximized()

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

  • extension.js:123
            this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(
                DBUS_INTERFACE_XML,
                this
            )

All Versions

Version Status
14 (2) Unreviewed
11 (1) Active

Previous Reviews on this Version

JustPerfection active
If you need any help with your extension you can ask us on: - [GNOME Extensions Matrix Channel](https://matrix.to/#/#extensions:gnome.org) - IRC Bridge: irc://irc.gimpnet.org/shell-extensions