Aero Snap feature for Ubuntu
Windows 7 came with some good UI features like Aero Snap.
Here's how to make it available on Ubuntu :
First you need compiz config settings manager and wmctrl. The first is used to configure compiz and add custom commands like snap to the left, right or top. The second to change size and state of active window.
Type this in your shell to install those packages :
sudo apt-get install compizconfig-settings-manager wmctrl
Next you need to add some custom commands in compiz that will snap the window :Open ConpizConfig Settings Manager
Click on the Commands button
Enter following three lines respectively in command 0, command 1 and command 2:
wmctrl -r :ACTIVE: -b remove,maximized_horz && WIDTH=`xdpyinfo | grep 'dimensions:' | cut -f 2 -d ':' | cut -f 1 -d 'x'` && HALF=$(($WIDTH/2)) && wmctrl -r :ACTIVE: -b add,maximized_vert && wmctrl -r :ACTIVE: -e 0,0,0,$HALF,-1
wmctrl -r :ACTIVE: -b remove,maximized_horz && WIDTH=`xdpyinfo | grep 'dimensions:' | cut -f 2 -d ':' | cut -f 1 -d 'x'` && HALF=$(($WIDTH/2)) && wmctrl -r :ACTIVE: -b add,maximized_vert && wmctrl -r :ACTIVE: -e 0,$HALF,0,$HALF,-1
wmctrl -r :ACTIVE: -b add,maximized_vert,maximized_horz
Finally you must activate those three commands when you click respectively to the left edge, the right edge and the top edge of the screen.
Click on Button Bindings tab
Activate Run command 0 by pressing Deactivated button right of it, click on Activate, select left edge and validate
Activate Run command 1 by pressing Deactivated button right of it, click on Activate, select right edge and validate
Activate Run command 2 by pressing Deactivated button right of it, click on Activate, select top edge and validate
Close CompizConfig, open a random window and click to the left, top or right edge to enjoy window snapping on Ubuntu.