Subject: Re: menu-creator
To: None <reed@reedmedia.net>
From: Roman Kennke <roman@ontographics.com>
List: netbsd-users
Date: 01/22/2004 01:49:20
> On Mon, 19 Jan 2004, Roman Kennke wrote:
>
>> I am looking for a tool that creates WM menu entries for installed
>> applications. Something like the 'menu' package in Debian would be
>> fine. I
>
> I do want an automated system to add new menu entries when a package is
> installed.

What do you think about the following approach (inspired by the debian
menu package):
1. applications that want to have a menu entry place a file in
/usr/pkg/etc/menu/app.d with the following content:
application name: Emacs
menu: Applications/Editors
icon: /usr/pkg/usr/share/emacs/icon/emacs.png

2. window managers that support the menu mechanism place a script/program
in /usr/pkg/etc/menu/wm.d that must accept some command line arguments:1. 'add'/'remove'
2. app-name
3. menu
4. icon
2.-4. is equivalent to the entries in the app.d files

These programs are intended to update the system-wide (optionally
user-wide) menu-entries for the supported window manager.
3. The menu package provides a tool, lets call it 'update-menus', that
reads the files in etc/menu/app.d and supplies the content as command line
arguments to the programs in etc/menu/wm.d. This tool also keeps track of
the application, for which it already has menus, so that with every run of
'update-menus' sends 'remove' to the wm.d programs for applications that
are no longer in app.d and 'add' for applications that are new or updated
in app.d.
4. When an application like in 1. is installed, it should call
update-menus, so that all window-managers pick up the new program.
This should not be too hard to implement. I think, when I find some time,
I will do that.
Any suggestions?

Cheers, Roman