Tools - set up your favorite commands in a nice hierarchical menu
structure.  It ain't perfect, but it's a good start.  This was partially
inspired by Cyberlink which I force-ported to 0.9, but later decided it
didn't do enough of what I wanted.  Twm (from X) had some effect on me as
well, although this config language is a lot simpler (just for the menu
layout - not all the goodies that go with a window manager). 

However, I've learned what I wanted, and I probably won't do much else with
this, unless I get hit by an inspiration again.

For those who are interested in learning from the source, the current
version of Tools does interesting manipulation with the following NeXT
Classes and features:  Menu, Text, Defaults Databases, some IB work,
Preferences, SavePanel, OpenPanel, Application, and Cursor.

Resource file definition is as follows:

autostart shell-command

as in

autostart "Terminal -NXFont Ohlfs -NXFontSize 18"

or

autostart "open foo.wn"

The following creates a menu entry in the Tools menu called main with
submenus called "title1", "title2", "submenu1", and "title6".  "Submenu1"
contains submenus "title3", "title4", and "title5".  Each of the "title"
entries are bound to the shell command which follows in the "action"
section.  This can be used to start any command that you would use from the
Shell, and provides a sort of extension to the Dock which allows
applications to have different arguments, such as to place terminals at
different fixed locations or start applications which won't fit in the
Dock.  I primarily use it to create Terminals which rlogin to seperate
hosts.  There are a lot of uses for the creative person.  :-)

"main" : (
	title1 : "action",
	title2 : "action",
	submenu1 : (
		title3 : "action",
		title4 : "action",
		title5 : "action"
	)
	title6 : "action"
)

You can use single quotes, double quotes, or backslash as quoting
characters.  Various quotes quote each other, so you should be able to put
most anything you want in the line of quotes in a resource file.

The BNF for the above resource file is something like:

menu-entry : title COLON action

title :  string

action : string
       | OPEN_PAREN menu-entry [COMMA menu-entry]* CLOSE_PAREN

Each entry in parens is a submenu.  See the file "toolsrc" for a copy of my
current config file.

The config file is read from $HOME/.toolsrc.

Let me know if you substantially improve it and I'll stick it in the
archive.

Gerrit Huizenga
gerrit@cc.purdue.edu
