The idea would be to extend TotalSpaces2 with the ability to record which spaces are active, their configuration and the monitor they should be attached to, and to optionally link their creation and deletion to monitor plugin/plugout.
This could permit them to survive bugs and crashes, as discussed in this thread:
And to (optionally) have them belong to a certain monitor only, as in “they go away when I unplug a monitor and get restored when I plug it in again”. I personally hate when I add spaces to a secondary monitor and find them attached to the primary one when I disconnect it - my grid is not the same anymore and circulation does not work as before. This would work especially well with the neat beta feature that Stephen implemented to change simultaneously spaces when multiple monitors are present, as described here:
It’s frustrating that space memory works ok with my machines (spaces are re-assigned correctly), but not on other people’s. But I also understand that having spaces from your other monitors migrate to your laptop when you unplug it is undesirable - that annoys me too.
To save the exact configuration of your spaces requires saving the monitor, the position, the app-spaces assignments, and the background image settings (which are a little complicated - OSX stores them in a small database).
So it’s not totally trivial to implement a proper solution, even with the abilities TotalSpaces already has. But I do think it’s a good project to do this.
The Mavericks Mission Control “Displays have separate spaces” is good (menubar on each screen, spaces) but it would be great if TotalSpaces kept track of the number of spaces and adjusted. I also use Moom to remember window placement and it seems to handle the number of screens and spaces fine.