Subject: Re: RFC: generating menus from packages
To: None <>
From: Jeremy C. Reed <>
List: tech-pkg
Date: 09/04/2002 09:17:28
> > > 	It should automatically update the default config file - or a
> > > 	file that the default config file automatically includes. I don't
> > > 	believe anyone suggested anything else.
> >
> > Then how am I supposed to delete the wm package if the default config file
> > changes?

The configuration files simply contain information that can be reused to
generate menus.

It has nothing to do with a wm package itself. You may delete a window
manager package and all is well.

If you choose to use it, then simply install a menu generation package for
your window manager or write your own script to use the menu data. Again:
it will not overwrite any window manager configurations and it will not
overwrite any existing menu configurations.

If you want to use it, then manually configure your window manager to use
(or include) that new menu.

> > And what happens if the default config file changes? Do we need to fix all
> > packages just to update the wm package?

No. The data is generic and easily parsable.

If for some reason your favorite window manager changes, then the single
script for making that a menu for that window manager can be fixed.

> > Or what if I want to switch to a different wm?

Switching to a different window manager is fine too. The menu data is not
window manager specific. Just install a the script that parses the generic
menu data and generates a menu specific for your window manager, if you
want to use it. If you don't want to use it, then don't.

On Wed, 4 Sep 2002, David Brownlee wrote:
> 	As I understand the mechanism:
> 	Installing a package with menu entry data
> 	   - adds menu entry data to a master list

Yes. Entirely generic and simple. It is not specific for any window
manager. It should contain the basic information that would be needed for
creating a menu entry for your favorite window manager though.

> 	   - for each package that has expressed an interest in menu entry data,

Exactly. Not all packages will have menus. It is just extra candy to make
a package ready to use for novices (and save time for others too).

"I just installed gnotepad, how do I run it?"

> 	     run a script which updates that packages default config file, or
> 	     file that that package's default config includes.

"Including" it is a good idea which doesn't overwrite any default (or
pkgsrc maintainer's provided) menu.

A menu can be generated three ways:

1) automatically: a configurable pkgsrc/packages option to run all scripts
in some defined directory when ever a package is installed. (This is a
feature that could be useful without menus too.)
2) manually: an administrator can rerun the script(s) for the installed
window manager(s) whenever desired. (Note: that the menus can contain
entries manually added too.)
3) by the end-user; each end-user can have their own menu data and run the
script(s) themselves. This is useful for end-users who try or use multiple
window managers: it saves time because they don't have to manually create
menus for each.

> In the event
> 	     that a package cannot include a generated config file it may make
> 	     sense to make its default config a symlink to the generated file.

I never thought of that. That is a good idea.

> 	Installing a package which cares about menu entry data
> 	   - Register its script, then run it


I have new patches and examples. See my other email.

   Jeremy C. Reed