1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
   | #!/usr/bin/install-menu # this file has to be executable # put under ~/.menu-methods # will run by update-menus # default generate ~/.config/awesome/menu.lua # you need to require("menu") to use menu.debian_menu
  compat="menu-1"
  !include menu.h
  compat="menu-2" outputencoding= "UTF-8";
  function q($s) = "\"" esc($s,"\\\"") "\""; function s($s) = replacewith(replacewith($s,"/","_"), " ", "_"); function findicon($filename)=        ifelsefile($filename, q($filename),         iffile("/usr/share/pixmaps/" $filename,                    q("/usr/share/pixmaps/" $filename))); function x11menu()= "\t{"q(title())","q($command) ifnempty($icon, ","findicon($icon))"},\n"; function textmenu()= "\t{"q(title())", \"x-terminal-emulator -e \".."q($command) ifnempty($icon, ","findicon($icon))"},\n";
  supported;     x11= x11menu();     text= textmenu(); endsupported;
  startmenu=      s($section)" = {\n"; endmenu=        "}\n"; submenutitle=   "\t{"q(title())","s($section)"},\n"; genmenu=        "menu.lua"; rootsection=    "debian_menu"; userprefix=     "/.config/awesome/"; preoutput=      "-- automatically generated file. Do not edit (see /usr/share/doc/menu/html)\n\nmodule(\"menu\")\n\n";
   |