#!/usr/sbin/install-menu
#   -*- mode: shell-script; -*-
#
# uwm (0.2.9a)
#
#  **  by Stephan Helma <sph@debian.org> **
#  With valuable improvements from Bill Allombert <ballombe@debian.org>.
#
# Include the local preferences
!include menu.h
compat="menu-1"
outputencoding="ISO-8859-1"

function q($x) = esc($x,"\\\"")

supported
  x11=  "  ITEM \"" q(title()) "\":\"" q($command) "\";\n"
  text= "  ITEM \"" q(title()) "\":\"" q(term()) "\";\n"
  # Comment out the above line and uncomment the following if you want
  # to use uwm's advanced feature of preprocessing the config files
  # (needs a proprocessor. The default is cpp, but this can be changed by
  # setting the environment variable CPP for example to "gcc -E").
  #text= "  ITEM \"" title() "\":TERMCOMMAND(-T QUOTE(" title() ") -e " $command ");\n"
  wm=   "OtherWMs = " stripdir($command) "\n"
endsupported

startmenu=""
endmenu=ifneq($title,"Debian menu","}\n")
submenutitle="SUBMENU \"" q(title()) "\" {\n"
# WindowManagers has to go into other file!
# Put menu definition for WindowManagers into dummy file
# and delete it afterwards
genmenu=ifeqelse($needs,"wm",ifeqelse($title,"uwm","dummy","uwmrc-wm.hook"),ifeqelse($title,"WindowManagers","dummy","appmenu.hook"))
postrun="rm -f " prefix() "/dummy"
preoutput="% /etc/X11/ude/appmenu.hook resp. /etc/X11/ude/uwmrc-wm.hook\n% Automatically generated file. Do not edit (see /usr/share/doc/menu/html)\n\n% These are some macros which can be used by uwm's advanced feature of\n% preprocessing the config files with a C preprocessor. You've to\n% (un)comment two lines in '/etc/menu-methods/uwm' to use it with the\n% Debian menu system. Feel free to change the TERMCOMMAND to your\n% favourite xterm. But do it in '/etc/menu-methods/uwm' to preserve\n% your settings since this file gets overwritten with every update-menu!\n\n#define QUOTE(X) #X\n#define TERMCOMMAND(ARGS) QUOTE(/usr/bin/X11/xterm -ls ARGS)\n\n"
rootprefix="/etc/X11/ude/"
userprefix=".ude/config"
mainmenutitle="Debian menu"
treewalk="(M)"
