shell script to get pid of window by clicking on it