#!/bin/sh url=http://et.hs-wismar.de/~infosc/index.php?file=config16n stopfile=`mktemp` idfile1=`mktemp` idfile2=`mktemp` idfile3=`mktemp` cleanup() { rm $idfile1 rm $idfile2 rm $idfile3 rm $stopfile killall pluggit } control_c() { cleanup exit $? } trap control_c INT xrandr --fb 4000x768 surf -x "$url" > "$idfile1" 2>/dev/null & surf -x "$url" > "$idfile2" 2>/dev/null & #surf -x "$url" > "$idfile3" 2>/dev/null & sleep 3 wmctrl -i -r "$(cat $idfile1)" -e 0,0,30,1280,720 wmctrl -i -r "$(cat $idfile2)" -e 0,1285,30,1280,720 #wmctrl -i -r "$(cat $idfile3)" -e 0,$((1280*2+10)),30,1280,720 start_and_watch_pluggit() { ts=`mktemp` while [ -e "$stopfile" ]; do pluggit/pluggit "$@"; sleep 1; done } start_and_watch_pluggit --dfb:remote=192.168.2.55 -w "$(cat $idfile1)" & start_and_watch_pluggit --dfb:remote=192.168.2.65 -w "$(cat $idfile2)" & #start_and_watch_pluggit --dfb:remote=192.168.2.75 -w "$(cat $idfile3)" & wait cleanup