* [9fans] acme: loading sets of windows
@ 2009-03-17 4:28 Michael Brown
0 siblings, 0 replies; only message in thread
From: Michael Brown @ 2009-03-17 4:28 UTC (permalink / raw)
To: 9fans
Recently I've been finding it useful to open sets of windows in acme
via an rc script, but I have the feeling I'm doing it in a pretty
inelegant way (see basic version of my script below). This has led me
to the following questions:
1. Is there a way to load dumps into a current acme instance via rc?
2. Is there a way to create and delete columns via 9p?
*****
#!/usr/local/plan9/bin/rc
fn openset {
for(i in $set) B $i
}
# Hard-delete all open acme windows.
fn cleanslate {
for(i in `{9p ls acme | 9 grep '[0-9]+'}) {
echo delete | 9p write acme/$i/ctl
}
# Avoids pollution of the ps environment.
killall E >[2]/dev/null
}
switch($1) {
case -a
set = ( /path/1 /path/2 )
case *
set = ( /path/3 /path/4 /path/5 )
}
cleanslate
openset
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-03-17 4:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-17 4:28 [9fans] acme: loading sets of windows Michael Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).