henk1955
Group: Members
Posts: 249
Joined: June 2004 |
|
Posted: Jan. 15 2005,21:59 |
|
Code Sample | defmenu("mainmenu", { submenu("Apps", { submenu("Editors", { menuentry("Beaver", make_exec_fn('beaver')), menuentry("Vim", make_exec_fn('rxvt -rv -e vi')), menuentry("Nano", make_exec_fn('rxvt -rv -T "Nano" -e nano-tiny')), }), submenu("Graphics", { menuentry("xzgv Image Viewer", make_exec_fn('/usr/bin/xzgv')), menuentry("Xpaint", make_exec_fn('/usr/bin/X11/xpaint')), }), submenu("Office", { menuentry("Pathetic Writer", make_exec_fn('/usr/local/bin/pw')), menuentry("Siag Spreadsheet", make_exec_fn('/usr/local/bin/siag')), menuentry("Xpdf", make_exec_fn('/usr/local/bin/xpdf')), menuentry("Xcalc", make_exec_fn('xcalc')), menuentry("SQLite Book", make_exec_fn('/usr/local/bin/sqlitebook.pl')), menuentry("PIM using Index", make_exec_fn(' rxvt -rv -T "PIM using Index" -e /usr/bin/index')), menuentry("Net Dictionary", make_exec_fn(' rxvt -rv -T "Internet Dictionary" -e /usr/local/bin/getword')), }), submenu("Sound/MPEG/VoIP", { menuentry("gPhone", make_exec_fn('gphone')), submenu("XMMS", { menuentry("Xmms Audio/MPEG", make_exec_fn('xmms')), menuentry("Xmms Play CD", make_exec_fn('xmms /dev/cdrom')), menuentry("Download High Bandwidth Mp3 Streams", make_exec_fn('rxvt -rv -T "Grabbing streams..." -e /opt/.xmms_streams_grab.sh highbandwidth')), menuentry("Download Low Bandwidth Mp3 Streams", make_exec_fn('rxvt -rv -T "Grabbing streams..." -e /opt/.xmms_streams_grab.sh lowbandwidth')), submenu("Xmms News Feeds", { menuentry("Xmms Play 'The Linux Show'", make_exec_fn('xmms http://audio.ibiblio.org:8000/linuxlive')), menuentry("Xmms 'KCPW NPR News'", make_exec_fn('xmms http://kcpw.xmission.com:80/kcpw.ogg')), menuentry("Xmms 'CBC Radio One News'", make_exec_fn('xmms http://oggtrial.nm.cbc.ca:80/cbcr1-toronto.ogg')), }), menuentry("wMix", make_exec_fn('wmix')), }), }), }), menuentry("Help", querylib.query_man), menuentry("About Ion", querylib.show_aboutmsg), submenu("Styles", "stylemenu"), submenu("Exit", { --menuentry("Restart", querylib.query_restart), menuentry("Restart", restart_wm), menuentry("Restart Fluxbox", function() restart_other_wm("fluxbox") end), --menuentry("Exit", querylib.query_exit), menuentry("Exit", exit_wm), }), })
|
this part of the fluxbox menu i convertetd by hand. you can see it is linear.
there is only ONE defmenu
the syntax is: defmenu( "menuname", { menuentry(" menuentry title", make_exec_fn('command')), submenu( "submenu title1", { menuentry(" menuentry title1", make_exec_fn('command1')), menuentry(" menuentry title2", make_exec_fn('command2')), submenu( "subsubmenu title1", { menuentry(" menuentry level2", make_exec_fn('command3')), }), }), submenu( "submenu title2", { }), submenu( "submenu title3", { }), })
simpliefied that is:
defmenu( "title", { sequence of submenu or menuitems seperated by ,})
submenu( "title", { sequence of submenu or menuitems seperated by ,})
menuentry( "title", function())
-------------- You have a Q or just want to chat? Come to #damnsmalllinux on irc.freenode.net! Open 24/7
dell latitude c640 p4@1.6Ghz 256Mb DSL0.9.1-remaster asus p4p800-vm p4@2.8Ghz HT / celeron@2.4Ghz 512Mb DSL0.9.1-remaster (alsadebs.dsl) ABit BE6 celeron@466 256Mb DSL0.9.1-remaster (xawtv)
|