Yes, this is possible with
devilspie (As I am using this myself now). Except, this program runs as daemon and do not require shell script.
It handles application windows' border decoration, behaviour (sticky, always on top), window geometry, position and states (maximize, fullscreen) based on matched traits. It can control not only Firefox, but almost any graphical applications at launch.
To use this, you will have to create the configuration files for each application you want to control. You can find practical examples in this fullest documentation.
If you need GUI to write the configuration files, there's
gDevilspie. Newer releases of Ubuntu includes this in Software Center, but you can download directly from its project page.
On second thought, perhaps you are actually looking into "tiling window manager"--which is another different approach.