#!/bin/rc # waits for you to click another window, then reports its wsys dir read -c 144 /dev/wctl >/dev/null for(i in /dev/wsys/*/wctl) if(~ `{read -c 72 $i} *' cur'*) echo $i | sed 's/wctl$//' echo current > /dev/wctl