DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Alexey has posted 28 posts at DZone. View Full User Profile

Docking Windows In Ubuntu (like In Windows 7)

11.29.2010
| 5074 views |
  • submit to reddit
        In terminal:
    sudo apt-get install wmctrl
    xrandr
In System Preferences Keyboard Shortcuts:
Press [Add], create command "dock left" (assuming you have 1600x900):
    bash -norc -c "wmctrl -r :ACTIVE: -b remove,maximized_horz ; wmctrl -r :ACTIVE: -e 0,0,0,800,900"
Then assign shortcut.
Same for "dock right":
    
    bash -norc -c "wmctrl -r :ACTIVE: -b remove,maximized_horz ; wmctrl -r :ACTIVE: -e 0,800,0,800,900"

An alternative way (that didn't work for me):
   sudo apt-get install compizconfig-settings-manager
   sudo apt-get install compiz-fusion-plugins-extra
   ccsm
Type "grid", enable grid, open it and update shortcuts.