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

!include menu.h

genmenu="menu.hook"
rootprefix="/etc/X11/WindowMaker/"
userprefix="GNUstep/Library/WindowMaker/"
treewalk=(M)
rootsection="/Debian"

function exec($action,$com)= \
        "  \"" $title "\" " ifnempty($shortcut, "SHORTCUT " $shortcut " ") $action " " esc($com,"*") "\n" 

supported
x11=	exec("EXEC",$command) 
wm=	exec("RESTART",$command) 
text=	exec("EXEC",term())
wmaker= exec("",$command ifnempty($arg," " $arg))
endsupported

preoutput= "/* Automatically generated file. Do not edit (see /usr/doc/menu/README) */\n\n#include \"wmmacros\"\n"

mainmenutitle=""
submenutitle= ""

startmenu= "\n" \
           ifelse( \
                title(), \
                title() " MENU", \
                "Debian MENU\n\n#include <menu.prehook>" \
           ) \
           "\n"
endmenu=   ifelse( \
                title(), \
                title() " END", \
                "\n#include <menu.posthook>\n\nDebian END" \
           ) \
           "\n"
