After almost a year, the Grid plugin in Unity is still broken.
For the uninitiated, the grid plugin is designed to quickly place windows around the screen in a neat grid. More details here.
If you follow the link to the launchpad bug and review the comments, you may find a ppa that resolves this issue, however, this fix requires you to replace the entire compiz-plugins-main package. I see a high potential for that ppa to become obsolete.
sudo apt-get install xdotool
I’ve used xdotool in the past to send keyboard presses to an application via a shell script, but tonight I realized that this tool has a lot more power. Below you’ll find a shell script that uses xdotool to resize and place a window on the grid. Run the script multiple times, and it will cycle through the various states. It’s not yet a complete solution by any means, but it’s is a proof of concept.
resize Note: I had to rename to .txt so that wordpress would let me attach it.
If you want to get really fancy, you could setup a custom keyboard shortcut to run this command.
Is it perfect? Not even close. I would much rather see this sort of functionality compiled into the window manager. On the other hand, this took me twenty minutes to whip up and since it is not baked into the window manager, it should run on Unity, Gnome Shell, Cinnimon, LXDE, Gala or any other modern window manager.