The following script fails to resize an already maximized window:wmctrl -i -r :ACTIVE: -b remove,maximized_vert,maximized_horzxdotool windowunmap --syncxdotool windowmap   --syncwmctrl -r :ACTIVE: -e 0,300,168,740,470I am pretty sure the culprit is in the middle two lines, which I am meaning to apply to the currently active window.  
Resizing a maximized window from the command line
window management;wmctrl;xdotool
Looks like the -i option in the first wmctrl cmd is causing trouble.Try this:wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horzwmctrl -r :ACTIVE: -e 0,300,168,740,470