Xubuntu Aero Snap Hotkeys?

13,058

Solution 1

Very similar to Jamie's answer, I set up the settings in the same place (Settings Manager → Window Manager → Keyboard) to directly mimic Aero Snap:

  • Tile window to the left: Super+← (Left Arrow)
  • Tile window to the right: Super+→ (Right Arrow)
  • Maximize window: Super+↑ (Up Arrow)

Solution 2

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:

  1. Snap one window to the upper left corner, and drag to adjust width if needed
  2. Super+V (to maximize vertically)
  3. Resize/drag second window to the right of the first, if needed (just so they're not overlapping)
  4. 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.

Solution 3

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

Solution 4

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.

Share:
13,058

Related videos on Youtube

wag2639
Author by

wag2639

I work in IT :)

Updated on September 17, 2022

Comments

  • wag2639
    wag2639 almost 2 years

    How can I set up my Xubuntu to quickly use a hotkey (super + direction keys) like Aero Snap in Windows 7?

    • wag2639
      wag2639 about 14 years
      The XFCE Window Manger easily allows you to set maximize/minimize (hide) shortcuts. Any suggestions on how to have things take up only half the screen?
    • quack quixote
      quack quixote about 14 years
      which version of Xubuntu are you using?
  • wag2639
    wag2639 almost 14 years
    how do do the key bindings?
  • eslambasha
    eslambasha almost 14 years
    use the key u choose + arrow keys (right, left, etc...)
  • Alix Axel
    Alix Axel about 11 years
    Sorry, have to downvote because I agree more with the other answer by @TomRitter. Xubuntu with Compiz is almost Ubuntu.