Moving all open windows from monitor#2 to monitor#1

Hi,

Would like to have a script that I can keep handy as a shortcut on my monitor#1 desktop, s.t. I can move all the open windows currently on monitor#2 desktop can be moved to monitor#1 desktop.

I need this because my current UPS is just good enough to power my desktop PC and one 19" monitor (connected as monitor#1). My other 24" monitor (monitor#2) is pretty power hungry which I connect directly to wall power, and not through UPS. Due to unplanned (frequent) powercuts, I lose wallpower and the monitor#2.

thanks,
B

I haven’t done what you require (moving windows from one display to another), however I have moved wnidows from one virtual desktop to a different one, and modified which virtual desktop was displayed by script so wmctrl (window manager control) may also do what you wish, but I haven’t looked.