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.

DisplayName
  • 11,468
  • 20
  • 73
  • 115
George
  • 1,799
  • 2
  • 25
  • 30

1 Answers1

6

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
lemonsqueeze
  • 1,475
  • 15
  • 15
  • 1
    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