7

The following script fails to resize an already maximized window:

wmctrl -i -r :ACTIVE: -b remove,maximized_vert,maximized_horz
xdotool windowunmap --sync
xdotool windowmap   --sync
wmctrl -r :ACTIVE: -e 0,300,168,740,470

I am pretty sure the culprit is in the middle two lines, which I am meaning to apply to the currently active window.

4

Looks like the -i option in the first wmctrl cmd is causing trouble.
Try this:

wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz
wmctrl -r :ACTIVE: -e 0,300,168,740,470
  • It seems as if, when a window is maximized, that wmctrl cannot resize same until such time as the wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz is invoked. – Digger Jun 16 '18 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.