ref: 6cfd33c55f68b8feb3bedb0ae7bca67ad3c49c4a
dir: /common/
#!/bin/rc
screen=`{read -c 60 < /dev/screen}
screenx=$screen(4)
screeny=$screen(5)
factor=`{echo '(' ^ $screenx ^ '*' ^ $screeny ^ ') / (1920 * 1080)' | bc}
if(~ $factor 0) factor = 1
fn scale {
for(num in $*)
echo $factor ^ '*' ^ $num | bc
}
fn offsetx {
echo $screenx ^ '-' ^ $* | bc
}
fn offsety {
echo $screeny ^ '-' ^ $* | bc
}
window -r `{scale (5 5 161 200)} stats -lmisce
window -r `{scale (5 205 161 400)} winwatch
window -r `{scale (5 405 200 600)} calwidget
window -miny 130
#window riowstart
# run a system shell on the serial console
~ $#console 0 || window -scroll console