On my laptop at work, I use an external monitor, but when I'm away from my desk I just use the laptop monitor.
On OSX I used to use Stay but I'm struggling to get the same functionality on Ubuntu.
Compiz Place Windows Plugin may be useful for you but not essentially the same as "Stay" for OSX. Anyway, there are a few other plugins that will allow you to have more control on the position, placement mode and other window features.
From the site:
A screenshot is provided here for you to see the "Fixed Window Placement" tab inside of the Place Windows Plugin.