Is there any way to get the dock to use "intellihide" (this is a carry over from various docks in the linux world). Basically that means that the dock is always visible if no windows are in its space, but if a window gets too close, the dock reverts to autohide type behavior. I can only find "autohide" and always visible. I would prefer something as I described.
I have developed an application (mainly using AppleScript) that does this, or at least very close to what you want: https://github.com/gjherbiet/DockIntellihide.app