plan9port/lib/acme.rc

43 lines
509 B
Text
Raw Permalink Normal View History

2005-01-04 22:12:12 +00:00
fn newwindow {
winctl=`{9p read acme/new/ctl}
winid=$winctl(1)
}
fn winctl {
2006-06-30 04:59:35 +00:00
echo $* | 9p write acme/$winid/ctl
2005-01-04 22:12:12 +00:00
}
fn winread {
2006-06-30 04:59:35 +00:00
9p read acme/$winid/$1
2005-01-04 22:12:12 +00:00
}
fn winwrite {
2006-06-30 04:59:35 +00:00
9p write acme/$winid/$1
2005-01-04 22:12:12 +00:00
}
fn windump {
if(! ~ $1 - '')
winctl dumpdir $1
if(! ~ $2 - '')
winctl dump $2
}
fn winname {
winctl name $1
}
fn winwriteevent {
echo $1$2$3 $4 | winwrite event
}
fn windel {
if(~ $1 sure)
winctl delete
if not
winctl del
}
fn wineventloop {
. <{winread event >[2]/dev/null | acmeevent}
}