Although I am not a “Windows” fan, I find the Windows 7 aero snap feature very useful. If you have had the s After a series of experimental tries, it finally works in Ubuntu.
Let’s Get Started
This guide will show you how to enable Windows 7 snap in Ubuntu via Compiz setting manager.
Step 1:
Well, you will need Compiz Manager to enable the snap feature. In case you don’t have Compiz manager, open the terminal and type:
sudo apt-get install compizconfig-settings-manager wmctrl
Note: Extra option should be selected in Change Desktop Background -> Visual Effects tab
Step 2:
Open Compiz setting manager (System -> Preferences -> CompizConfig Settings Manager). In Genaral, tick Commands option and open its configuration window.
Step 3:
Paste following code in command line 0, command line 1, and command line 2 repectively.
command line 0 :
WIDTH=`xdpyinfo | grep ‘dimensions:’ | cut -f 2 -d ‘:’ | cut -f 1 -d ‘x’` && HALF=$(($WIDTH/2)) && wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz && wmctrl -r :ACTIVE: -b add,maximized_vert && wmctrl -r :ACTIVE: -e 0,0,0,$HALF,-1
command line 1 :
WIDTH=`xdpyinfo | grep ‘dimensions:’ | cut -f 2 -d ‘:’ | cut -f 1 -d ‘x’` && HALF=$(($WIDTH/2)) && wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz && wmctrl -r :ACTIVE: -b add,maximized_vert && wmctrl -r :ACTIVE: -e 0,$HALF,0,$HALF,-1
command line 2:
wmctrl -r :ACTIVE: -b add,maximized_vert,maximized_horz
Step 4:
Switch to edge binding tab and assign the following
Run Command 0 – Left
Run Command 1 – Right
Run Command 2 – Top
Step 5:
Head back to General Options and set the value of Edge Trigger Delay to 1000
Note: Now move your cursor to left, right, or top of screen and wait (the delay 1000ms) for the snap effect.
Update: You can also enable Window Snap using Compiz Grid