ProgrameR

Enable Aero Snap effect under Metacity in Linux

Posted in Linux by emeryyi on May 21, 2010

Waffleshop’s blog http://www.thewaffleshop.net/2010/03/08/aero-snap-effect-for-metacity/ gives some terminal command which enables Linux to have Aero snap feature like windows 7. This is much faster and resource efficient than its counterpart run under Compiz. You must have Metacity and wmctrl installed. To use it shortcut is WIN+<- and WIN+->

Snap Left:

1. gconftool-2 −type string –set /apps/metacity/global_keybindings/run_command_1 “<Super>Left”

2. gconftool-2 –type string –set /apps/metacity/keybinding_commands/command_1 “wmctrl -r :ACTIVE: -e 0,0,0,`xwininfo -root | grep Width | awk ‘{ print (($2/2)-6)}’`,`xwininfo -root | grep Height | awk ‘{ print $2 }’`”

Snap right:

1. gconftool-2 –type string –set /apps/metacity/global_keybindings/run_command_2 “<Super>Right”

2. gconftool-2 –type string –set /apps/metacity/keybinding_commands/command_2 “wmctrl -r :ACTIVE: -e 0,`xwininfo -root | grep Width | awk ‘{ print (($2/2)+5) “,0,” (($2/2)-6) }’`,`xwininfo -root | grep Height | awk ‘{ print $2 }’`”

Maximize:

1. gconftool-2 –type string –set /apps/metacity/window_keybindings/toggle_maximized “<Super>Up”

Tagged with: ,

Leave a comment