#!/usr/sbin/install-menu # # Generates fluxbox menus for all registered applications. # compat="menu-1" !include menu.h compat="menu-2" function find_icon($name) = ifnempty($name, ifelsefile("/usr/share/pixmaps/" stripdir($name), " ", ifelsefile("/usr/share/icons/hicolor/16x16/apps/" stripdir($name), " ", ifelsefile("/usr/share/icons/mini/" stripdir($name), " ", "")))); function x11_command()= nstring(level(), " ") "[exec] (" esc(title(), ")") ") {" $command "}" find_icon($icon) "\n"; function embeded_command()= nstring(level(), " ") "[" $command "] (" translate(lang(), title()) ")\n"; function text_command()= nstring(level(), " ") "[exec] (" esc(title(), ")") ") {" term() " -T \"" title() "\"}" find_icon($icon) "\n"; function BeginSection() = ifelse($basesection, ifempty($command, nstring(level(), " ") "[submenu] (" translate(lang(), title()) ") " find_icon($icon) "\n"), "\n[begin] (ALT Linux)\n[include] (~/.fluxbox/usermenu)\n"); function EndSection() = ifelse($basesection, nstring(level(), " ") "[end]\n", "[end]\n"); genmenu = "menu"; rootprefix = "/etc/X11/fluxbox"; userprefix = ".fluxbox"; treewalk = "(M)"; sort=ifelse(ifelse($command, "1", "0"), $sort, title()); supported; x11 = x11_command(); text = text_command(); fluxbox = ifelse($fluxcommand, x11_command(), embeded_command()); wm = nstring(level(), " ") "[restart] (" title() ") {" $command "}\n"; endsupported; startmenu = BeginSection(); submenutitle = ""; endmenu = EndSection(); preoutput = "#\n# Generated by update-menus\n#\n# Start ALTLinux menu for Fluxbox\n#\n"; postoutput = "\n#\n# End ALTLinux menu\n#\n";