[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    [gentoo-dev] [PROPOSAL] Menu system for all gentoo wm's.
From:       Svyatogor <svyatogor () gentoo ! org> (by way of Svyatogor
Date:       2003-05-29 15:13:04
[Download RAW message or body]

Hello Folks!
I have recently been thinking on implementing the menu system for gentoo,
something like what we have in mandrake (I guess it came from debian).
At the moment when a user installs a new app he needs to figure out what is
the name of the binary he needs and then add it to the menu of his window
manager(s). This is done automatically only if you're installing an app for
your desktop (i.e. gnome apps on gnome, kde apps on kde).
The whole idea is make thins process automatic - the user installs a programm
foo, log out back in and sees the menu entry in all window managers.

Here is my suggestion on who it should work.
On the system we have a central location for the menu, say /etc/menu.d/
Here all subfolders represent categories and files - menu entries
respectively. The file contains three entries, something like this:

Name=MyApp
Command=/usr/bin/myapp
Icon=icon.png

These entries are created when a pckage is merged by a special domenu command
in a ebuild. E.g. domenu Editors, GVim, gvim
In addition to the categories folder the menu.d/ would contain a folder
"rules", which has the ebuild style files describing how the menus for each
installed wm/de should be generated. It would look like this:

init_menu() {
#Do all nessecary init. here. Eg. touch the menu file.
}

start_menu() {
#Wright whatever should be in heading of the menu.
#Especially important for one file menus file fluxbox.
}

write_entry() {
#Ovious. Here we have ${Cat} ${Name} ${Com} vars defined and set.
}

end_menu() {
#whatever should be done to finish the menu.
}

Now the most important step: genrating users menu. First of all a user should
have a choice of whether to use this system or not. If the user likes it he
should add a call to syncmenu (a bash scipt) to the .bash_profile or whatever
file.

When the syncmenu starts it first of all syncronises the ~/.menu with
/etc/menu.d (It will basically sync everything except the files that have
Custom tag - means edited by user and don't touch). Then this file sources
the files in the /etc/menu.d/rules and calls the functions in the order:
init, start, write (for every entry), end.

I guess the system is quite flexible and allows to support any wm,
irrespectively of the menu style it uses. However, before starting woking on
it I just wanted to get some feedback on the idea.

Ok, waiting for your criticism ;)

--
Sergey Kuleshov <svyatogor@gentoo.org>
Let the Force be with us!


--
gentoo-dev@gentoo.org mailing list

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic