Is there a keyboard shortcut I can use to make a window occupy the left or right half of the screen? I'm using a modified version of Ubuntu. On Mac I just use Divvy but I'm not sure if there is a Linux tool to do the same thing.

  • Which version of Ubuntu and what do you mean by "modified"?
    – Caleb
    Aug 1, 2011 at 18:09
  • It's the internal Google version (Goobuntu). I'm not sure which version. Aug 1, 2011 at 18:11
  • Maybe you can tell us what your Desktop Environment and Window Manager are? Is it Unity or Gnome 3?
    – Caleb
    Aug 1, 2011 at 18:14
  • GNOME 2.3. Sorry I just got this machine a few days ago. Aug 1, 2011 at 18:16
  • That tells us what DE you're using, but not what Window Manager. (Compiz/Metacity/etc.)
    – frabjous
    Aug 4, 2011 at 5:44

4 Answers 4


If you install Compiz Config Settings Manager with:

sudo aptitude install compizconfig-settings-manager

You can then enable this functionality with Grid mode. Go to

Systems > Preferences > CompizConfig Settings Manager

and scroll down to Window Management. Then check Grid mode and, once you open the options for that mode, choose keybindings for Put Left and Put Right.

  • It's asking me for a password, and I can't figure out what it wants. Everytime I type in a password (I've tried different ones) it says "Incorrect" Mar 15, 2013 at 17:41

If you are the kind of guy who likes to partition your screen up into increments like full screen and half screen using keyboard shortcuts, you might consider using a different window manager entirely. I don't think there is any reason you have to stay with the whole Gnome/Metacity/Compiz scene.

There are a plethora of Window Managers available for Linux that have different philosophies about how they handle windows. Personally I am sold on using framework or tiling window layouts rather than the traditional floating model. There are several WM's that support mix-modes as well. I use awesome and love how flexible it is particularly with being scriptable and it's handling of multiple monitors. There are similar ones such as dwm and xmonad as well.

I think the amount of screen space these WM's provide and the time they save you fiddling with your windows is well worth the effort to set them up to your liking.


Just use a shortcut app to create shortcuts for this script..

Example calls: script_name left ... script_name right

The best documentaton/examples I've found for wmctrl is at Spiral of Hope

For xprop, the man page has a few basic examples, but I haven't found anything for it with as much detail as the Spiral of Hope page...

# $1 ... top | bottom | left | right
unset x y w h a
eval $(xprop -root |sed -rne 's/^_NET_WORKAREA\(CARDINAL\) = ([0-9]+), ([0-9]+), ([0-9]+), ([0-9]+)$/x=\1;y=\2;w=\3;h=\4/p' \
                          -e 's/^_NET_ACTIVE_WINDOW\(WINDOW\): window id # (0x.*)$/a=\1/p')
[[ -z "$a" ]] && exit 1                            
case "$1" in
  top    ) ((h=h/2));;
  bottom ) ((y=y+(h-(h/2))));((h=h/2));;
  left   ) ((w=w/2));;
  right  ) ((x=x+(w-(w/2))));((w=w/2));;
wmctrl -i -r "$a" -e 0,$x,$y,$w,$h
  • Fred, this looks useful, but can you provide links to any sort of documentation of the system calls here? Aug 4, 2011 at 5:00
  • Added some info to the answer...
    – Peter.O
    Aug 4, 2011 at 5:47
  • Doesn't work. I get the following error "The -e option expects a list of comma separated integers: "gravity,X,Y,width,height""
    – Jakobovski
    Dec 25, 2017 at 9:13

As stated earlier you can use compizconfig-settings-manager and if so you need the compiz-fusion-plugins-extra if it is not ready installed with the compizconfig-settings-manager package and if you have installed that plugin aswell you might need to activate it in:

Preferences -> Plugin List

And then you should be all set.

You must log in to answer this question.

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