#!/bin/rc # 2024-02-20T23:13:37-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) switch($w){ case 2560 2880 2878 font=/lib/font/contrib.bit/hugevga/unicode.font case 2158 2160 font=/lib/font/bit/lucm/unicode.9.font case * font=/lib/font/bit/vga/unicode.font } if(~ $w 2880 2878 && ~ $h 1920 1918) font=/lib/font/contrib.bit/VGAMedium/unicode.24.font truetypefs switch($*){ case -t bind $home/lib/rio.theme.orig $home/lib/rio.theme riocmd=(rio.themes) case -ta bind $home/lib/rio.theme.amber $home/lib/rio.theme riocmd=(rio.themes) case -tf bind $home/lib/rio.theme.fairlight $home/lib/rio.theme riocmd=(rio.themes) case -tg bind $home/lib/rio.theme.green $home/lib/rio.theme riocmd=(rio.themes) case -tmb bind $home/lib/rio.theme.black $home/lib/rio.theme riocmd=(rio.themes) case -ts riocmd=(rio.themes) bind $home/lib/rio.theme.sigrid $home/lib/rio.theme 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