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.
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
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
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..
script_name left ...
The best documentaton/examples I've found for
wmctrl is at Spiral of Hope
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...
#!/bin/bash # $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));; esac wmctrl -i -r "$a" -e 0,$x,$y,$w,$h #
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.