I would like my application to overlap the dock (with the app behind of course) I'm on 10.7.3.  I have my dock at the bottom.  To the left and right of the dock, I see the wallpaper.

I would actually like the app I'm in to extend all the way to the bottom of the monitor, with the dock on top of the bottom of the app.

So now it looks like this:



I'd like it to look like this (this is just a crude mockup, I don't really want to see the wallpaper bleeding through of course).  Can this be done?
If you turn hiding on for the Dock, using the + button will extend maximized windows to the very bottom of the screen. When you mouse down near the bottom of the screen the dock will appear and be on top of any program windows on the display.

If you turn Dock hiding off after maximizing windows in this fashion they'll stay maximized all the way to the bottom of the screen. The Dock will be on top of the windows.

As promised, here's some AppleScript to make this happen:

tell application "System Events"
    set the autohide of the dock preferences to true
end tell
delay 1
tell application "System Events"
    set frontApp to first application process whose frontmost is true
end tell
tell application (name of frontApp)
    set zoomed of window 1 to not (zoomed of window 1)
end tell
delay 1
tell application "System Events"
    set the autohide of the dock preferences to false
end tell


You can follow these directions to assign that script to a keyboard short cut. I put the delays in there because I found every few runs the dock would unhide before the window had maximized and as such, it wouldn't be behind the dock.