polonium icon indicating copy to clipboard operation
polonium copied to clipboard

Add keyboard shortcuts to temporarily float a window or add it to filter processes

Open Grafcube opened this issue 1 year ago • 4 comments

Is your feature request related to a problem? Please describe. Sometimes when an app spawns a temporary window it causes the entire layout to jump around unnecessarily. For example, it's a hassle to have to check the window class and then add it to the exceptions and then reload the script.

Describe the solution you'd like A keyboard shortcut to make the focused window float without persistence and another to add the current window to the list of exceptions.

Describe alternatives you've considered I can't think of any.

Additional context I cloned the repo and attempted to add the feature myself but I'm not too familiar with typescript or how the KDE apis work so I couldn't figure it out.

Thanks for the great extension. My system is literally unusable without it :+1:

Grafcube avatar Jun 24 '24 14:06 Grafcube

A keyboard shortcut to make the focused window float without persistence

Isn't that the behavior of retile window? (A misleading name, I know)

Raven-002 avatar Jun 26 '24 13:06 Raven-002

Unless I'm using it wrong, no that doesn't seem to be the case. All it seems to do is tile a window that isn't already tiled.

Grafcube avatar Jun 26 '24 13:06 Grafcube

It should also untile a tiled window

    retileWindow(): void {
        const window = this.ctrl.workspace.activeWindow;
        if (window == null || !this.ctrl.windowExtensions.has(window)) {
            return;
        }
        if (this.ctrl.windowExtensions.get(window)!.isTiled) {
            this.ctrl.driverManager.untileWindow(window);
        } else {
            this.ctrl.driverManager.addWindow(window);
        }
        this.ctrl.driverManager.rebuildLayout();
    }

This is the code of the shortcut

Raven-002 avatar Jun 26 '24 13:06 Raven-002

Yeah sorry that's my mistake. I just didn't notice the window get untiled. It does seem a little bit inconsistent with maximized windows but that's not really a big deal.

Grafcube avatar Jun 26 '24 14:06 Grafcube