#!/usr/sbin/install-menu
#
# Generates ion3 menus for all registered applications.
compat="menu-1"

!include menu.h

genmenu="cfg_appmenu.lua"
rootprefix="/etc/ion3/"
userprefix="/.ion3/"
rootsection="appmenu"

function ltitle()=translate(lang(),title())

supported
    x11=   "  menuentry(\"" esc(ltitle(), "()") "\", \"ioncore.exec_on(_,'" esc($command, "()$\"\'") "')\"),\n" 
    text=  "  menuentry(\"" esc(ltitle(), "()") "\", \"ioncore.exec_on(_,'" term() "')\"),\n"
endsupported

preoutput= \
  "-- Automatically generated file. Do not edit.\n-- ALTLinux MENU\n\n"
postoutput=""

startmenu= "defmenu(\"" esc($section,"()") "\", {\n"
submenutitle= "  submenu(\"" esc(ltitle(),"()") "\", \"" esc($section,"()") "\"),\n"
endmenu= "})\n\n"
treewalk="c(m)"
