Skip to content

Instantly share code, notes, and snippets.

@mrenouf
Created November 1, 2010 01:08
Show Gist options
  • Save mrenouf/657412 to your computer and use it in GitHub Desktop.
Save mrenouf/657412 to your computer and use it in GitHub Desktop.
Substitute for Aero Snap using Compiz Grid plugin, with hot corners and sides
#!/bin/sh
apt-get install compizconfig-settings-manager compiz-fusion-plugins-extra xautomation
gconftool-2 --set --type list --list-type string /apps/compiz/general/allscreens/options/active_plugins [grid,commands]
gconftool-2 --set --type string /apps/metacity/keybinding_commands/command_1 "xte 'keydown Control_L' 'keydown Alt_L' 'key KP_4' 'keyup Control_L' 'keyup Alt_L'"
gconftool-2 --set --type string /apps/metacity/keybinding_commands/command_2 "xte 'keydown Control_L' 'keydown Alt_L' 'key KP_6' 'keyup Control_L' 'keyup Alt_L'"
gconftool-2 --set --type string /apps/metacity/keybinding_commands/command_3 "xte 'keydown Control_L' 'keydown Alt_L' 'key KP_7' 'keyup Control_L' 'keyup Alt_L'"
gconftool-2 --set --type string /apps/metacity/keybinding_commands/command_4 "xte 'keydown Control_L' 'keydown Alt_L' 'key KP_9' 'keyup Control_L' 'keyup Alt_L'"
gconftool-2 --set --type string /apps/metacity/keybinding_commands/command_5 "xte 'keydown Control_L' 'keydown Alt_L' 'key KP_1' 'keyup Control_L' 'keyup Alt_L'"
gconftool-2 --set --type string /apps/metacity/keybinding_commands/command_6 "xte 'keydown Control_L' 'keydown Alt_L' 'key KP_3' 'keyup Control_L' 'keyup Alt_L'"
gconftool-2 --set --type string /apps/compiz/plugins/commands/allscreens/options/run_command0_button '<LeftEdge>Button1'
gconftool-2 --set --type string /apps/compiz/plugins/commands/allscreens/options/run_command1_button '<RightEdge>Button1'
gconftool-2 --set --type string /apps/compiz/plugins/commands/allscreens/options/run_command2_button '<TopLeftEdge>Button1'
gconftool-2 --set --type string /apps/compiz/plugins/commands/allscreens/options/run_command3_button '<TopRightEdge>Button1'
gconftool-2 --set --type string /apps/compiz/plugins/commands/allscreens/options/run_command4_button '<BottomLeftEdge>Button1'
gconftool-2 --set --type string /apps/compiz/plugins/commands/allscreens/options/run_command5_button '<BottomRightEdge>Button1'
@mrenouf
Copy link
Author

mrenouf commented Nov 1, 2010

WARNING: If you use this, please know that it will activate the compiz plugins 'command' and 'grid' while deactivating any others you may have turned on (see like #2). The gconftool does not appear to support appending to a list, so it will have to be some scripting hacks. Improvements to this effect would be greatly appreciated!

Credit:
I first found this hack demonstrated on YouTube:
http://www.youtube.com/watch?v=XvlTlyEasD8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment