Plan 9 from Bell Labs’s /usr/web/sources/contrib/sl/rc/spread

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc
# setup middle screen
rfork e
scr=(`{cat /dev/draw/new >[2]/dev/null})
w=$scr(11)
h=$scr(12)
fn go{
	window -scroll -r $1 $2 $3 $4 'label sam; sam `{cat $home/src/edit}'
	#window -r $1 $2 $3 $4 'label mail; rc'
	for(i in `{grep -v -e '^#' $home/src/read})
		plumb $"i
}
if(~ $w 640 && ~ $h 480){
	# nothing to see here
}
if not if(~ $w 1024 && ~ $h 768)
	go 2 39 1022 768
if not if(~ $w 1280 && ~ $h 800)
	go 2 39 1280 800
if not if(~ $w 1280 && ~ $h 1024)
	go 261 0 980 1024
if not if(~ $w 1376 && ~ $h 768)
	go 233 0 1040 768
if not if(~ $w 1408 && ~ $h 1050)
	go 321 0 1039 1050
if not if(~ $w 1440 && ~ $h 900)
	go 297 0 1104 900
if not if(~ $w 1600 && ~ $h 1200)
	go 290 0 1251 1200
if not if(~ $w 1680 1696 && ~ $h 1050)
	go 406 0 1274 1050
if not if(~ $w 1920 && ~ $h 1080)
	go 274 42 1181 1010

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].