sticky-window-snapping icon indicating copy to clipboard operation
sticky-window-snapping copied to clipboard

Resizing from another kwin script / wmctrl

Open RaitaroH opened this issue 5 years ago • 1 comments

So I really wanted to have some grow and shrink shortcuts. I experimented a bit with wmctrl -r :ACTIVE: -e 0,0,0,700,5 made a script and all that. Then I retooled this kwin script a bit, like so

function shrinkCurrentWindow() {
  var win = workspace.activeClient;
  win.geometry = {
      x: win.x + 25,
      y: win.y + 25,
      width: win.width - 50,
      height: win.height - 50,
  }
}

The problem is that the windows resize when you are using the mouse to resize, not some script (kwin, or bash), otherwise the window that is being resized simply goes beyond the edges/borders of the adjacent windows, making this kwin script have no effect at all.

The idea with this is basically replicate a more tiling sorta thing. I am very aware there are some kwin scripts for that too, but KWin script to let snapped window edges stick together when one window is resized. here I have a window that is being resized :)

RaitaroH avatar Feb 08 '19 14:02 RaitaroH

Example video. Peek 2019-02-08 16-27.zip

RaitaroH avatar Feb 08 '19 14:02 RaitaroH