#!/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 "\" "  $action " " esc($com,"*") "\n" 

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

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

postoutput= "\n#include <menu.posthook>\n\nDebian END\n"

startmenu= ifnempty($title, "\n" $title " MENU \n")
submenutitle= ""
endmenu= ifnempty($title, $title " END\n")
