One could imagine (as I have) writing a shell script to do this, then attach a keyboard shortcut to it...
wmctrl can do some pretty cool stuff from the commandline... you just need additional window information to do this from a keyboard shortcut.
Here's one I wrote to toggle the maximize vertical and horizontal to fix a problem with compiz...
Requires:
xwininfo (xorg-X11-utils)
xdotool
wmctrl
Code:
#!/bin/bash
#
# Hack to get the desired toggle maximize vert/horiz effect in compiz
#
TYPE=$1
# Get the active window id
WINID=`xdotool getactivewindow`
# Get the upper left X (absolute)
ULX=`xwininfo -id $WINID | grep "Absolute upper-left X" | sed 's/Absolute upper-left X: //'`
MAXVERT=`xwininfo -id $WINID -wm | grep "Maximized Vert"`
MAXHORZ=`xwininfo -id $WINID -wm | grep "Maximized Horz"`
ULX=`echo $ULX | sed -e 's/^[ \t]*//'`
MAXVERT=`echo $MAXVERT | sed -e 's/^[ \t]*//'`
MAXHORZ=`echo $MAXHORZ | sed -e 's/^[ \t]*//'`
# First toggle what we want
case "$TYPE" in
vert)
wmctrl -r :ACTIVE: -b toggle,maximized_vert
;;
horz)
wmctrl -r :ACTIVE: -b toggle,maximized_horz
;;
esac
# Now move it back, if it needs to be moved back
if [ -z "$MAXVERT" ]; then
# Sleep a little... because it takes time for the window to move
usleep 50000
wmctrl -r :ACTIVE: -e 0,${ULX},-1,-1,-1
fi