OK, I've been playing with dynamic directory menus, and here's wha tI
currently have:
AddToMenu RootMenu "Root Menu" Title
+ "Xterm 80x24" Exec exec xterm -si -sk -geom 80x24&
+ "Xterm 80x40" Exec exec xterm -si -sk -geom 80x40&
+ "Xterm 80x60" Exec exec xterm -si -sk -geom 80x60&
+ "" Nop
+ "Xterm 80x24 Dir" DynamicDir24
+ "Xterm 80x40 Dir" DynamicDir40
+ "Xterm 80x60 Dir" DynamicDir60
AddToFunc DynamicDir24
+ "I" DestroyMenu "_root_u_lohner"
+ "I" PipeRead "/u/lohner/projects/treemenu/dynamic.pl /u/lohner 80x24"
+ "I" Popup _root_u_lohner
and dynamic.pl is a perl5 script that takes the directory to scan, scans
it, and returns a menu for FVWM to parse, like this:
DestroyMenu "_root_u"
AddToMenu _root_u "/u" Title
+ "XTerm ./" Exec /bin/sh -c 'cd /u;exec xterm -si -sk -geom 80x24&'
+ "../" _root_Func
+ "lohner/" _root_u_lohnerFunc
AddToFunc _root_Func"
+ "I" PipeRead "/u/lohner/projects/treemenu/dynamic.pl / 80x24"
+ "I" Popup _root_
+ "C" DestroyMenu "_root_"
+ "I" DestroyFunc "_root_Func"
AddToFunc _root_u_lohnerFunc
+ "I" PipeRead "/u/lohner/projects/treemenu/dynamic.pl /u/lohner 80x24"
+ "I" Popup _root_u_lohner
+ "C" DestroyMenu "_root_u_lohner"
+ "I" DestroyFunc "_root_u_lohnerFunc"
The problem is this: sometimes it works fine, sometimes it doesn't,
sometimes it refuses to remove the popups, sometimes it kills my window
system and returns to my login prompt with a core dump. Can anyone suggest
how the AddToFuncs should look to work best? Is it legal to have a Func
destroy itself? Should all items be "I"? The last two "C"? Menu instead
of Popup? I've tried a number of these with varying results, but so far
nothing has worked consistently so I'm wondering what the 'correct' way of
doing this is.
Or, if anyone has a dynamic directory menu working, I wouldn't mind a
copy of that. If anyone wants my perl code, I can post it once its
working.
Thanks for the help in advance.
Nils.
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Thu Oct 23 1997 - 11:31:07 BST