Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to figure out if it's possible to do the following(or rather bind this action to a hot key): If on a workspace I have 2 windows, I want to maximize each one vertically and resize them horizontally to be half of the screen each and position them next to each other. Basically after this operation there should 2 equally sized windows, taking up all space.

If that's not possible with default Gnome, how can I write up a python script to do that(i.e. where can I start? Never did UI scripting with Python before...)

share|improve this question
I would like to hear how this can be done with python. Can windows be resized and repositioned by command line? –  e.m.fields Oct 1 '10 at 17:04

6 Answers 6

up vote 18 down vote accepted

Unity has this built in by default.

You can Ctrl + Alt + a keypad key to arrange the window. It's fairly logical if you have a keypad!

share|improve this answer
That's nice - but you need a keypad. And that's not on my ThinkPad's keyboard... –  petermolnar Aug 6 '12 at 15:39
@petermolnar Is there not even a Fn-overlay one? Lots of laptops (ThinkPads inclusive) have overlays for keypad keys so you press Fn+j for KP1, for example. Give it a go. –  Oli Aug 6 '12 at 17:21
that's available for now, will be extinct from Tx30 ( T430, T530 ... ) –  petermolnar Aug 7 '12 at 20:54
So Ctr-Alt-7 docks top left, ctr-alt-1 does bottom left, should ctr-alt-4 do full left side? Mine doesn't... any idea where you can set these quick keys? –  djc391 Jun 27 '13 at 18:35
Hmm. In 13.04 Ctrl + Alt + Arrow moves workspaces....is there a way to set the keyboard shortcut you want for this functionality? –  Crisfole Jul 26 '13 at 11:49

Aside from the Grid plugin, which is very buggy on my system, there are these alternatives for simple tiling:

X-tile: This is a Gnome panel applet that when right clicked will allow you to select an array of options to tile all windows on a particular viewport/workspace. It also has a stand alone window when left clicked with lots of options. X-tile has recently been fixed to be compatible with Compiz viewports, but be warned that the display size options may need to be tweaked if you use an unconventional desktop layout, such as AWN dock, auto-hide panels, etc. Don't worry, it's all done through a simple gui interface.

You can find it here: http://gtk-apps.org/content/show.php/X+Tile?content=99624

PYwo: Python window organizer. This little program runs in the background and seems much lighter than Grid. It also is more feature-rich, even with the default settings. Although very simple in scope, there is no gui.

You can find it here: http://code.google.com/p/pywo/

Easystroke: This is system-wide mouse gesture program for the Ubuntu desktop. And it is awesome. Once you set your keyboard shortcuts you can use this program to assign simple mouse gestures to them. For example, if Ctrl+Alt+L is your shortcut to tile a single window to left-top of the screen, you can make an Easystroke rule that when you hold the right mouse button and draw a line up and left the selected window gets tiled as if you hit the keys. This program also offers application specific gestures, allowing you to set commands for web browsers, file managers, and so on. It comes with an easy to use gui and is available in the official repositories.

Enter this in a terminal:

sudo apt-get install easystroke

share|improve this answer
should be sudo apt-get install easystroke. You're missing an "r". However, +1 for the excellent answer, and copy/paste apt-get. –  Taeram Feb 26 '13 at 19:33
Fixed the typo. Thanks! –  Deadite81 Mar 5 '13 at 15:05

Ctrl + Superkey + Arrow

A example of a superkey is the windows/start key. I am using Ubuntu 12.10.

share|improve this answer

If you want to simply do resizing by dragging a window to an edge of your screen like in Windows 7 Aero Snap, try this:


Even better than with Aero Snap, you can tile Windows horizontally, vertically, or make them take up only a quarter of your screen.

Or you can wait for Compiz 0.9 to be released. Edge binding functionality is going to be implemented there by default in the Grid plugin.

share|improve this answer

Install and use the CompizConfig Settings Manager:

sudo apt-get install compizconfig-settings-manager 

Go to Windows Management > Grid to set the keys you want!

CompizConfig Settings Manager screenshot

Note: DON'T touch any option if you are not sure about the result. I already broke Ubuntu Unity to not follow that warning...

share|improve this answer

protected by Community Oct 12 '14 at 19:06

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.