Subject: Re: building menu datafiles
To: Jeremy C. Reed <reed@reedmedia.net>
From: David Brownlee <abs@netbsd.org>
List: tech-pkg
Date: 01/09/2001 12:47:37
On Mon, 8 Jan 2001, Jeremy C. Reed wrote:

> On Mon, 8 Jan 2001, Jeremy C. Reed wrote:
>
> > I want to add some routines so I can automatically generate some datafiles
> > which can then later be used to create menus, for example for KDE or
> > Blackbox X11 window manager, from installed packages.
>
	I think this is a really good idea, though I'd prefer to see
	something a little more generic, which tags entries as 'X' or
	'text', etc, so it could be used for non X menu systems. Also
	tag window managers differently so you can insert the appropriate
	magic to replace the current window manager when selected.

> Either way, I believe it is best to have the package maintainers add menu
> entries for their packages.
>
> Maybe a pkg/MENU file something like:
>
> audio xcdplayer xcdplayer "CD player for X"
> www lynx "xterm -fn 6x13 -n lynx -title lynx -e lynx" "Alphanumeric display oriented World-Wide Web Client"
> x11 xglobe xglobe "Displays the earth as seen from space, similar to xearth"
>
	Would there be any reason not to use the standard package
	categories?

> Categories can be defined like:
>
> audio - - "Audio applications"
> audio/mixers - - "Sound Mixers"
>
> This MENU file could be the exact format of the real menu datafile and
> simply cat it and the real file into a temp file and then sort the temp
> file back to replace the real file. (By the way -- this is not the format
> of my script I made today.)
>
> > (Of course, once I have all the menu data compiled, it will be trivial to
> > generate correct menu files using this information.)
>
> I also made a quick perl script to generate a blackbox menu from my data.
> It is at http://www.reedmedia.net/misc/netbsd/build_menu/blackbox
>
> > Has this been discussed before?
> >
> > Any other suggestions?
>
> What do you all think? Is it a good idea to allow package maintainers help
> create X menu entries? (I am thinking about my mother!)

	I think its a very good idea, though we may need to use awk and
	similar to ensure it works without perl.

		David/absolute		-- www.netbsd.org: No hype required --