The Start of Something Sizable: Ubuntu Grid Fix

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.

I arranged the windows faster than I typed that sentence.

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.

3 thoughts on “The Start of Something Sizable: Ubuntu Grid Fix

  1. It’s a pity you don’t have a donate button! I’d definitely donate to this superb blog! I suppose for now i’ll settle for bookmarking and adding your RSS feed to my Google
    account. I look forward to brand new updates and will share this blog with my Facebook group.
    Talk soon!

  2. This will probably be a fantastic site, might you be interested in
    doing interviews about how you developed it? Should you choose e-mail me!
    Thanks, We have recently been searching for info on this topic forever and yours is the greatest I’ve located thus far. Thanks for that marvelous blogging! I truly enjoyed reading it, that you are an amazing writer.Most surely i’ll make sure you bookmark your website and will
    give back later. I’ll encourage which you continue your great work, require a nice morning!

  3. I got onto from
    p=499 and I gotta state, you’ve got an attractive blog layout. How long have you been blogging for? The way you do all of this makes it look like a cinch. The all-around look of your blog is fantastic, let alone the material.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>