dgc / software / scry: a menu driver for screen(1)
dgc / software / scry: a menu driver for screen(1)


Background
I use screen [1] (1) extensively to multiplex lots of UNIX terminal sessions across just a few terminal windows. The trouble with screen is that once you have more than a few sessions, it starts to take up too much brain space just to keep track of them all. I often have more than 50 screen sessions going at once. scry helps me to remember what I have open, and to dip and glide among them all with ease.

scry is written in simple perl [2] . I run and develop it under 5.8.5, but I believe it works fine all the way back to 5.005. If you install Term::ReadLine [3] and Term::ReadLine::Gnu [4] and you get line editing and stuff — but those aren't necessary, and there are no actual dependencies other than perl and screen itself.


Screenshot
Here's a cut-and-paste of my current session.

Yo homie              dgc@monkey             Mon Oct 11  1:35:14 US/Central 2004

- 1) ++umail .....[pts/6 ]  16) dust.u1 .....[pts/13]  31) plaisance.r1 [pts/4 ]
  2) +auth931 ....[pts/41]  17) eminent.r1 ..[pts/32]  32) pretty.r1 ...[pts/38]
  3) +flow.1 .....[pts/36]  18) harper.r1 ...[pts/15]  33) pretty.u1 ...[pts/44]
  4) +ibot .......[pts/14] +19) harper.u1 ...[pts/18]  34) purple.u1 ...[pts/26]
  5) +iconv ......[pts/35]  20) heavy.u1 ....[pts/42]  35) relay00.r1 ..[pts/28]
  6) +irc ........[pts/2 ]  21) listhost.r1 .[pts/9 ]  36) relay01.r1 ..[pts/29]
  7) +monkey.r1 ..[pts/22]  22) listhost.r2 .[pts/34]  37) right*way.r1 [pts/12]
  8) +mud.1 ......[pts/1 ]  23) malic.u1 ....[pts/20]  38) right*way.r2 [pts/24]
  9) +oasis.1 ....[pts/46]  24) meltdown.r1 .[pts/17]  39) square.r1 ...[pts/16]
 10) +prism ......[pts/43]  25) midway.r1 ...[pts/25]  40) suck.r1 .....[pts/40]
.11) +ruby .......[pts/47]  26) mx01.r1 .....[pts/30]  41) whatever.r1 .[pts/21]
 12) cuchulain.r1 [pts/37]  27) nonsense.r1 .[pts/3 ]  42) xyzzy.r1 ....[pts/45]
 13) cuchulain.r2 [pts/39]  28) overkill.r1 .[pts/19]  43) xyzzy.r2 ....[pts/49]
 14) domain.r1 ...[pts/31]  29) peevish.r1 ..[pts/7 ]
 15) dust.r1 .....[pts/33]  30) peevish.r2 ..[pts/10]

Attach [1-43, ndkrqufs<>j+-!h?]: 


Description and configuration
Each item in the table is a screen session I have open. The names aren't important — they aren't governed by PROGRAM({{scry}}), but they do follow a pattern that I use for all screens, just to keep myself sane. The pty that each screen is attached to can be hidden, if you don't care about that. The display reformats itself on update if you make your terminal wider or narrower, and will use however many columns you want it to — this is all configurable in an rc file. The right*way screens are actually rightofway, but are contracted by scry to fit in the display. This, too, can be configured. Scry has a recent screen history, so that you can hop, skip, and jump among a set of "recent" screens. It has color support to augment its notations of which screens are "recent", and both the marker characters (-, ., and + above) and the colors are configurable -- see the template rc file [5] for more information.

(A template rc file is installed for you, if possible, the first time you run scry. It's at ~/.scry/rc.)

There's a modicum of online help — just enter CODE({{h}}) or ? at the prompt. You can get a quick reminder of what a keystroke does with this help command, too — for example, to see what the r command does, enter ? r).


History
I originally wrote a program that provided me this menu function in Bourne shell in about 1995, but it was too slow. A friend rewrote it in C a few years later, and now I've rewritten it again in perl. All three incarnations have been indispensable to me for about nine years now, and finally I'm ready to share it with the public.


Links
scry is just a single perl program. There is no external documentation or configuration file: these are contained within the program.

The latest version of scry is 1.12 -- this is a CVS version number.

    1. Screen: the screen multiplexer.
    2. Perl: Practical Extraction and Report Language.
    3. Term::ReadLine: the Term::ReadLine Perl module.
    4. Term::ReadLine::Gnu: the Term::ReadLine::Gnu Perl module.
    5. Rc file: template rc file.

$Id: index.html4,v 1.3 2003/10/16 19:34:52 dgc Exp $
Mail: dgc@uchicago.edu