42

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...)

1
  • 1
    I would like to hear how this can be done with python. Can windows be resized and repositioned by command line?
    – emf
    Oct 1, 2010 at 17:04

6 Answers 6

54

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!

7
  • 1
    That's nice - but you need a keypad. And that's not on my ThinkPad's keyboard... Aug 6, 2012 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, 2012 at 17:21
  • that's available for now, will be extinct from Tx30 ( T430, T530 ... ) Aug 7, 2012 at 20:54
  • 1
    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? Jun 27, 2013 at 18:35
  • 2
    Hmm. In 13.04 Ctrl + Alt + Arrow moves workspaces....is there a way to set the keyboard shortcut you want for this functionality? Jul 26, 2013 at 11:49
15

Ctrl + Superkey + Arrow

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

13

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://linux-apps.com/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

2
  • 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, 2013 at 19:33
  • easystroke is superawesome!
    – zuba
    Jul 3, 2015 at 10:24
4

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...

1

Try this http://www.omgubuntu.co.uk/2009/11/get-aero-snap-in-ubuntu/

1

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:

http://ubuntuforums.org/showpost.php?p=9974221&postcount=123

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .