Gentoo Archives: gentoo-dev

From: Igor Lev <hyperf@×××××××××.net>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] [PROPOSAL] Menu system for all gentoo wm's.
Date: Thu, 29 May 2003 18:40:21
1 I think this would be great especially if there is a frontend that allows you to choose the location/name of each menu item or menu directory. You can have the defaults come in the ebuilds and then allow the user to change it either by hand or through a fronted program to keep the syntax intact. As long as there is both freedom in changing the default layout of the menus, choosing which packages we want in the menus and in choosing whether to go with this system at all I think this would be a great idea.
3 -Igor
4 -------Original Message-------
5 From: Svyatogor <svyatogor@g.o>
6 Sent: 05/29/03 02:08 PM
7 To: gentoo-dev@g.o
8 Subject: [gentoo-dev] [PROPOSAL] Menu system for all gentoo wm's.
10 >
11 > Hello Folks!
12 I have recently been thinking on implementing the menu system for gentoo,
13 something like what we have in mandrake (I guess it came from debian).
14 At the moment when a user installs a new app he needs to figure out what
15 is
16 the name of the binary he needs and then add it to the menu of his window
17 manager(s). This is done automatically only if you're installing an app
18 for
19 your desktop (i.e. gnome apps on gnome, kde apps on kde).
20 The whole idea is make thins process automatic - the user installs a
21 programm
22 foo, log out back in and sees the menu entry in all window managers.
24 Here is my suggestion on who it should work.
25 On the system we have a central location for the menu, say /etc/menu.d/
26 Here all subfolders represent categories and files - menu entries
27 respectively. The file contains three entries, something like this:
29 Name=MyApp
30 Command=/usr/bin/myapp
31 Icon=icon.png
33 These entries are created when a pckage is merged by a special domenu
34 command
35 in a ebuild. E.g. domenu Editors, GVim, gvim
36 In addition to the categories folder the menu.d/ would contain a folder
37 "rules", which has the ebuild style files describing how the menus for
38 each
39 installed wm/de should be generated. It would look like this:
41 init_menu() {
42 #Do all nessecary init. here. Eg. touch the menu file.
43 }
45 start_menu() {
46 #Wright whatever should be in heading of the menu.
47 #Especially important for one file menus file fluxbox.
48 }
50 write_entry() {
51 #Ovious. Here we have ${Cat} ${Name} ${Com} vars defined and set.
52 }
54 end_menu() {
55 #whatever should be done to finish the menu.
56 }
58 Now the most important step: genrating users menu. First of all a user
59 should
60 have a choice of whether to use this system or not. If the user likes it
61 he
62 should add a call to syncmenu (a bash scipt) to the .bash_profile or
63 whatever
64 file.
66 When the syncmenu starts it first of all syncronises the ~/.menu with
67 /etc/menu.d (It will basically sync everything except the files that have
68 Custom tag - means edited by user and don't touch). Then this file sources
69 the files in the /etc/menu.d/rules and calls the functions in the order:
70 init, start, write (for every entry), end.
72 I guess the system is quite flexible and allows to support any wm,
73 irrespectively of the menu style it uses. However, before starting woking
74 on
75 it I just wanted to get some feedback on the idea.
77 Ok, waiting for your criticism ;)
79 --
80 Sergey Kuleshov <svyatogor@g.o>
81 Let the Force be with us!
84 --
85 gentoo-dev@g.o mailing list
87 >
89 --
90 gentoo-dev@g.o mailing list