Ubuntu / Linux news and application reviews.

I've recently seen a screencast by gotbletu about setting up hot corners for the Compiz Grid plugin which is a lot like Aero Snap but better in my opinion so I wanted to make this very easy to set up for everybody. After using the script in this post, you can move a window to a screen corner by right clicking the corner in which you want to move the active window to.

"Aero Snap" for Ubuntu (using Compiz) is not hard to set up but it requires a lot of copying and pasting so I though I'd make a script to do everything automatically so to achieve exactly what you see in the video, all you have to do is run the script I've created.

Bur firstly, what does the Compiz Grid plugin do?

The Compiz Grid plugin can be used to tile, position and resize your windows to fit an imaginary grid. All you have to do is press Ctrl + Alt + Keypad numbers to place the selected windows; for instance: Ctrl + Alt + 1 will move a window to the bottom left corner, Ctrl + Alt + 7 will move a window to the top left corner and so on.

By default you can't assign a Compiz hot corner to the Grid plugin which would be really helpful, but you can achieve this by using a package called "xautomation" and the Compiz Commands plugin.

Here is the screencast by gotbletu in which he is using the Compiz Grid plugin to set up Aero Snap in Ubuntu to see exactly what I'm talking about:

Set up Aero Snap in Ubuntu using Compiz and a script

Warning: by using this script, the commands from 0 to 7 from the Compiz Commands plugin will be overwritten so if you have some custom commands, save them in the last 4 command fields!

To get Aero Snap in Ubuntu, simply copy / paste the following commands in a terminal:
wget http://webupd8.googlecode.com/files/grid-corners
chmod +x grid-corners

The script installs compizconfig-settings-manager, compiz-fusion-plugins-extra and xautomation, enables the Compiz Grid and Commands plugins and sets all the commands and keybindings to a screen edge and mouse button 3 (right click). If you want to use a different mouse button, you can either manually change this in the Compiz Commands plugin or edit the script (it's easier - use search and replace) and run the script again.

Once you run the script, click a window, then place your mouse pointer to a screen corner/edge and right click.

By using the Grid plugin, the windows will also get resized when moved to a corner. If you don't want this, disable the Compiz Grid plugin and use PyWO instead (all you have to do is run it on starup).

For a different way to get Aero Snap in Ubuntu (but you'll still have to use Compiz), check out THIS video on YouTube (also read the video description - it includes a file you can download that has all the commands required to set up Aero Snap in Ubuntu). P.s.: the video also includes instructions on installing 'cowsay' and 'figlet' - you can ignore those and skip to the Aero Snap part.

[video and xautomation commands via gotbletu]