Hi,
thank you for the fast response.
Am Mit, 2004-03-17 um 00.04 schrieb Tuomo Valkonen:
>
> You're not calling the function created by make_bigmenu_fn
> ^^^
Aaggh!! Silly me!
> function(reg, sub)
> include("menu_applications")
> make_bigmenu_fn("mainmenu")(reg, sub)
> end
>
> might do it.
Works like a charm. Thank you.
>
> However, I consider it bad practise to load a file always when a
You are totally right. Please let me explain my setup and plan:
I have .desktop files like this one (rxvt.desktop):
$ cat rxvt.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=RXVT
Comment=Terminal Client f�r X-Window
Exec=rxvt -fn 10x20 -name Terminal +sb
Icon=terminal_48x48.xpm
MiniIcon=terminal.xpm
Categories=Terminal;System;
This is not to 100% the definition from freedesktop.org, but should not
be far from it.
A (shell)script parses these files and generate the menu. For the
example above, this would be like this:
defmenu("Menu_Terminal", {
...
menuentry("RXVT - Terminal Client f�r X-Window", make_exec_fn('rxvt -fn
10x20 -name Terminal +sb')),
...
})
defmenu("Menu_System", {
...
menuentry("RXVT - Terminal Client f�r X-Window", make_exec_fn('rxvt -fn
10x20 -name Terminal +sb')),
...
})
mainmenu
|
+Terminal
| +
| ---RXVT
|
+System
+
---RXVT
So i can edit, delete, create the .desktop file and update the menu
easily in one or two steps.
My next step is to rewrite the script as a lua-function. I am totally
new to lua, so this could take some time ;-).
After that...a query-function?
> function is called and would suggest going another (undocumented)
> route.
>
> defmenu("mainmenu", generate_mainmenu)
>
> where generate_mainmenu is a function that constructs a menu table like the
> ones you would pass to defmenu normally. See windowlist and workspacelist in
> menulib.lua for examples.
>
I will have a look at that!
Again, thank you very much.
bye
Frank
P.S.: I use .desktop files, but do not like the idea of a "Desktop".
Ion2 is IMHO mu
ch more effectice than all these "Desktop"-Managers.
> --
> Tuomo
>
--
"Oops, I accidently clicked on the "Outsource" icon, and now
everything is in Hindu."
Found on /.