shithub: rc

ref: 1d259c06594034a05bb204bff8abca2564032258
dir: /bin/rsam/

View raw version
#!/bin/rc
rfork ne
switch($vgasize){
case 3840x2160x*
	r=(0 564 3840 2152)
	rs=(0 564 3840 1882)
	rw=(0 1616 714 2160)
case 1920x1200x*
	r=(0 0 1920 1192)
	rs=(0 0 1920 1018)
	rw=(0 656 714 1200)
case 1920x1080x*
	r=(0 0 1920 1072)
	rs=(0 0 1920 898)
	rw=(0 536 714 1080)
case 1600x1200x*
	r=(0 0 1920 1192)
	rs=(0 0 1920 928)
	rw=(0 656 714 1200)
case 1400x1050x*
	r=(0 0 1400 1042)
	rs=(0 0 1400 906)
	rw=(0 506 714 1050)
case 1366x768x*
	r=(0 0 1366 760)
	rs=(0 0 1366 625)
	rw=(0 224 714 768)
}
if(~ $#r 0)
	exit 'nope, unknown resolution'
f=()
if(test -f $home/lib/rsam){
	f=`{cat $home/lib/rsam}
	eval 'f=('^$"f^')'
}
cat <<! >/env/fuckrc
unmount /mnt/plumb
plumber
bof -k '
	window -r $rw -scroll
	window -r $rs jam -a $* $f
'
!
window -m -hide -r $r rc /env/fuckrc