I wrote a nice little script that changes my monitor outputs according to whether an external monitor is connected or not and whether the laptop lid is open or closed or not and so on.
That works pretty well, the only thing is that when my big external monitor is unplugged the windows on the laptop screen exceed the workspace so that I would have to resize or reopen all windows first.
I am looking for a shell command or something that does this for me; it should just resize all windows so that they fit in the workspace.
Is this integrated in XFCE4? Or do I need some other program?
PS: I am using compiz as window manager and emerald for the decorations.