I'm experiencing a bug where when the machine comes back from standby a monitor connected via displayport (MST) does not come back on, however the windows are still in the area it cover if it did come on.
The only way to recover from this short of a restart is to disable and reenable the display now I can do that via the command line just fine but when the display is disabled all the windows get rearranged onto the remaining screen.
Is there a way to persist the window positions and restore them so my script could do this sequence:-
- enumerate windows, store positions
- display off (messing up positions)
- display on (making the display work again, yay!)
- restore position of the windows
I can do step 2 and 3 just fine but I'm lost for step 1 and 4
I know I can force a position per app but that's not what I want as I could be doing different things and have the same apps in different positions, I also have multiple terminals open, I need the current positions storing somehow and restoring.
Any help would be appreciated!