I created an alias that minimizes all the windows:

F12 {
var %i = $window(*,0)
while (%i >= 0) {
if ($count($active,$chr(32)) > 0) && ($window($active).state != minimized) window -n " $+ $active $+ "
else if ($window($active).state != minimized) window -n $active
dec %i
}
}

This works fine as long as I have only one connection. I have to press F12 twice if I have two connections. How to solve this problem?

Thanks.