Wmctrl doesn’t move window when snapped or tiled

cinnamonwmctrl

I'm using Mint 18.1 cinnamon. I'm trying to write a little bash program to move windows around.

I have a command that will remove maximized_vert and maximized_horz then move the window. It works fine if the the target window is maximized or just floating, but if the window is snapped into place using super [arrow] ( think this is tiling? ) it has no affect. The code is as follows

    wmctrl -r "$CHROME" -i -b remove,maximized_vert
    wmctrl -r "$CHROME" -i -b remove,maximized_horz
    wmctrl -r "$CHROME" -i -e '0,0,0,500,500'

Where "$CHROME" is the hex address or the window.

I repeat it works if the window is maxamized or if it is just floating but does not work when the window is tiled or snapped using super [arrow]

Thanks for the help

Best Answer

After playing around with this, I have a hack that works. Just add the maximized_vert or maximized_horz property to the window. Even if it already has the property, this will break tiling and will allow you to move the window position using wmctrl from there.

Silly, but it works.

Related Question