FVWM: howto conditionally add menu entries?

hw <[email protected]>
Newsgroups gmane.comp.window-managers.fvwm
Organization my virtual residence
Message-ID <[email protected]>
Hi,

how can I conditionally add menu entries?  For example:


[...]
Read fvwm-functions-starters-common.fvwm
Read fvwm-functions-starters-games.fvwm quiet
Read fvwm-functions-starters-local.fvwm quiet
[...]


DestroyMenu Main
AddToMenu Main
+ "Main"                        Title
+ "Common"                      PopUp Common
+ "Games"                       PopUp Games
+ "Local"                       PopUp Local


I want the "Common" and "Games" entries in the menu only when the files
defining them (like fvwm-functions-starters-games.fvwm) can be read.

I thought I could use something like

DestroyMenu Main
AddToMenu Main
+ Test (f fvwm-functions-starters-games.fvwm) AddToMenu Main "Games" PopUp Games


and that doesn't work in that the menu entry doesn't show up regardless
of the existance of the file.  There doesn't seem to be a way to test
whether something is defined or not; if there was, I could test if a
menu has been defined and only then add it to another menu.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.