#!/bin/rc d=(`{cat /dev/draw/new >[2]/dev/null}) minx=`{echo $d(9) | bc} maxx=`{echo $d(11) | bc} midx=`{echo $maxx / 2 | bc} miny=`{echo $d(10) | bc} maxy=`{echo $d(12) | bc} midy=`{echo $maxy / 2 | bc} margin=`{hoc -e '0.0125 * '$maxy} headbtm=`{hoc -e '0.15 * '$maxy} middletop=`{echo $headbtm + $margin | bc} middlebtm=`{hoc -e '0.6875 * '$maxy} lowertop=`{echo $middlebtm + $margin | bc} chatr=(`{hoc -e '0.15625 * '$maxx} $miny $midx $headbtm) cmdr=($midx $lowertop $maxx `{hoc -e '0.875 * '$maxy}) editr=($midx $middletop $maxx $middlebtm) facesr=($minx $miny `{hoc -e '0.15625 * '$maxx} $headbtm) kbmapr=(`{hoc -e '0.9 * '$maxx} $headbtm $maxx $maxy) pager=($minx $middletop $midx $middlebtm) statsr=(`{hoc -e '0.84375 * '$maxx} $miny $maxx $headbtm) winwatchr=($midx $miny `{hoc -e '0.84375 * '$maxx} $headbtm) window -r $facesr faces -i window -r $chatr -scroll irc window -r $chatr -hide 'label chatwrite; while (m = `{read})if(! ~ $#m 0)echo $user : $"m >>/n/chat/chat' window -r $chatr -hide 'label cat-v-write; while (m = `{read})if(! ~ $#m 0)echo PRIVMSG ''#''cat-v :$"m >>/srv/ircs' window -m -r $winwatchr winwatch -e '^(winwatch|faces|stats)' window -r $statsr stats -Elmz window -r $kbmapr -hide kbmap window -r $pager mail window -r $pager -hide window -r $pager -hide newt -p 100 window -r $pager -hide webshit window -r $pager -hide playlist window -r $pager -hide tube window -r $editr sam window -r $cmdr -scroll if(test -f $home/doc/bookmarks){ for(bookmark in `{cat $home/doc/bookmarks}) window -r $pager -hide ''page -j $bookmark `{echo $bookmark | sed 's/![0-9]+$//'}'' } # run a system shell on the serial console ~ $#console 0 || window -scroll console