I really miss the "Aero Snap" window snapping feature present in Unity 3D. Is there any way I can get it, or an alternative to it, in Unity 2D?
I really miss the "Aero Snap" window snapping feature present in Unity 3D. Is there any way I can get it, or an alternative to it, in Unity 2D?
11.10 and above
The fully fledged Aero-snap is a compiz feature.
If compiz is too heavy/problematic for your PC, then you could use a modified window manager such as
xfwm4
By dragging the windows to the top/bottom/left or right, the window will snap to that part of the screen. Dragging via the titlebar will revert its original size.
The nice-side effect of using
xfwm4
is that you get the nice GUI tweak tools to modify the keyboard/decorators etc:xfwm4-settings
- style/keyboard shortcuts/window focus model/window snapping controlxfwm4-tweaks-settings
- window cycling/nice lightweight compositor and much morexfwm4-workspace-settings
- define the number of workspaces you will use.how-to
The modified window-snap is available in my PPA
recommendation
By default, this window manager does not integrate with the global menu.
Two suggestions -
Suggestion 1:
Remove the global menu if you use maximised windows alot of the time since the xfwm4 decorations do not integrate with the gnome-panel.
Use
xfwm4 --replace
as a startup application to use this window manager instead of metacity.Suggestion 2:
Use
maximus
to remove the window decoration for maximised windows as per this Q&A:Mutter: Global menu integration
This doesn't work as well as the feature in Unity 3D, but it does work to some extent. My solution uses keyboard shortcuts, but you could easily use Edge Bindings (ie. left, right and top) instead to trigger the effect.
Install packages. Paste (Ctrl+Shift+V) this in terminal:
sudo apt-get install compizconfig-settings-manager compiz-fusion-plugins-extra wmctrl
Now open the Compiz Config Settings Manager (ALT+F2 ccsm, or system > preferences > CompizConfig…, etc). Select the “Commands” option.
In 'Command Line 0' paste: -
In 'Command Line 1' paste: -
And in 'Command Line 2' paste: -
Now go to 'Key Bindings'. Click on the button for 'Run Command 0', enable it and grab this key combination: press "start button" and the left arrow. Do the same for all of the commands, so it's like this:
NB: you can install the grid plugin (like in Unity 3D) which lets you use Ctrl+Alt+6 [Num Pad] etc to snap windows into a grid. However, I can't remember how to use window edges for this.
You can also use wmctrl for Aero snap, which has the following benefits:
I wrote a Python script to set up the commands. All you need to do is:
http://pastebin.com/T6StxqQd
I've had better luck with quicktile. Use it the same way, create shortcuts to the command.
http://ssokolow.github.com/quicktile/