How can I set up my Xubuntu to quickly use a hotkey (super + direction keys) like Aero Snap in Windows 7?
If you don't want to install Compiz on Xubuntu, you can still gain some useful window manager keyboard shortcuts with Xfce. In Xubuntu 11.10 I have set up keyboard shortcuts for the following actions (you can configure your own keyboard shortcuts by going to "Settings Manager" → "Window Manager" → "Keyboard"):
- Maximize window horizontally (Super+H)
- Maximize window vertically (Super+V)
- Fill window (Super+W)
- Fill window horizontally (Shift+Super+H)
- Fill window vertically (Shift+Super+V)
Obviously, none of the above actions will move windows or make them precisely 50% as wide as the "Aero" stuff does, but they're helpful nonetheless. For example, if you want two windows, side by side, at full height, you might:
- Snap one window to the upper left corner, and drag to adjust width if needed
- Super+V (to maximize vertically)
- Resize/drag second window to the right of the first, if needed (just so they're not overlapping)
- Super+W (to maximize the second window in the remaining space)
Granted, that's a bit more work than the Unity Aero-like behavior; I still find those window manager shortcuts rather useful.
install Compiz, go to your System menu > CompizConfig Settings Manager > right at the end of the window under Window Management Section click on Snapping Windows > Choose the key bindings and behaviour and then click Enable Snapping Windows from the left side of the window and you are done :)
To install both "compiz" and its external "compizconfig-settings-manager":
sudo apt-get install compiz sudo apt-get install compizconfig-settings-manager
This page shows how to do it with wmctrl (it's in the Ubuntu repositories, tiny program that stays out of your way until you call it) and even how to call the command with mouse gestures (though fortunately you can just ignore that if you want …). Note that you'll have to un-blogify the quotes on the commands shown there. Jamie Krug already showed how to get keybindings for maximising etc., bind a key to
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
to make the window fill the right 50% of your screen, etc.
For mouse op in xfce4, go to window manager-Advanced uncheck options for wrap workspaces when reaching screen edge. (note, this is not global, most apps comply, seems the "system" apps do not. You use this with Jon49's answer also "No need to install anything now days. Just open Windows Manager (CTRL+ESC Windows Manager). Then tab to Keyboard then find actions Tile window to the ... and click on each one you want to change. Click on edit and push the characters you would like it to work with."
There are verious daemons in the open source world that will handle multi-media keyboards or "hot keys"
Maybe this project will be useful to you: