#!/bin/rc # 2021-11-11T13:25:05-05:00 # launch rio. # copy this file to $home/bin/rc and modify to suit. # use with: http://plan9.stanleylieber.com/rc/tobit . /$cputype/mkfile scr=(`{cat /dev/draw/new >[2]/dev/null}) w=$scr(11) h=$scr(12) if(~ $w 2880 2878 && ~ $h 1920 1918) font=/lib/font/contrib.bit/VGAMedium/unicode.24.font truetypefs switch($*){ case -a riocmd=(rio.amber) bind /bin/faces.amber /bin/faces bind /bin/stats.amber /bin/stats bind /bin/aux/samterm.amber /bin/aux/samterm bind /bin/aux/statusmsg.amber /bin/aux/statusmsg bind /bin/vt.amber /bin/vt case -fm riocmd=(rio.fm -b) bind /bin/faces.b /bin/faces bind /bin/stats.tron /bin/stats bind /bin/aux/statusmsg.tron /bin/aux/statusmsg case -g riocmd=(rio.green -b) bind /bin/faces.green /bin/faces bind /bin/stats.green /bin/stats bind /bin/aux/samterm.green /bin/aux/samterm bind /bin/aux/statusmsg.green /bin/aux/statusmsg bind /bin/vt.green /bin/vt case -m riocmd=(rio.mono) bind /bin/faces.b /bin/faces bind /bin/stats.mono /bin/stats bind /bin/aux/samterm.mono /bin/aux/samterm bind /bin/aux/statusmsg.mono /bin/aux/statusmsg case -mb riocmd=(rio.mono -b) bind /bin/faces.b /bin/faces bind /bin/stats.mono /bin/stats bind /bin/aux/samterm.mono /bin/aux/samterm bind /bin/aux/statusmsg.mono /bin/aux/statusmsg case -r riocmd=(rio.red) bind /bin/faces.blue /bin/faces bind /bin/stats.blue /bin/stats bind /bin/aux/statusmsg.blue /bin/aux/statusmsg bind /bin/vt.red /bin/vt case -t bind $home/lib/rio.theme.orig $home/lib/rio.theme riocmd=(rio.themes) bind /bin/faces.orig /bin/faces case -ta bind $home/lib/rio.theme.amber $home/lib/rio.theme riocmd=(rio.themes) bind /bin/faces.amber /bin/faces bind /bin/stats.amber /bin/stats bind /bin/aux/samterm.amber /bin/aux/samterm bind /bin/aux/statusmsg.amber /bin/aux/statusmsg bind /bin/vt.amber /bin/vt case -tf bind $home/lib/rio.fairlight.theme $home/lib/rio.theme riocmd=(rio.themes) bind /bin/faces.green /bin/faces bind /bin/stats.green /bin/stats bind /bin/aux/samterm.green /bin/aux/samterm bind /bin/aux/statusmsg.green /bin/aux/statusmsg bind /bin/vt.green /bin/vt case -tg bind $home/lib/rio.theme.green $home/lib/rio.theme riocmd=(rio.themes) bind /bin/faces.green /bin/faces bind /bin/stats.green /bin/stats bind /bin/aux/samterm.green /bin/aux/samterm bind /bin/aux/statusmsg.green /bin/aux/statusmsg bind /bin/vt.green /bin/vt case -tmb riocmd=(rio.themes) bind $home/lib/rio.theme.black $home/lib/rio.theme bind /bin/faces.b /bin/faces bind /bin/stats.mono /bin/stats bind /bin/aux/samterm.mono /bin/aux/samterm bind /bin/aux/statusmsg.mono /bin/aux/statusmsg case 't r' exec echo tilt right >/dev/vgactl case 't l' exec echo tilt left >/dev/vgactl case t 't n' exec echo tilt none >/dev/vgactl case * riocmd=(rio $*) exec $riocmd -i $home/lib/riostart } #exec $riocmd -B <{tobit $riob} -i $home/lib/riostart # old if(~ $riocmd rio.themes){ riob=`{basename `{fortune <{hget http://bg.stanleylieber.com/index}}} ramfs -m /n/bg hget http://bg.stanleylieber.com/img/bg/$riob >/n/bg/$riob && tobit /n/bg/$riob >/n/bg/bg.img } exec $riocmd -i $home/lib/riostart