#!/usr/sbin/install-menu
compat="menu-1"

!include menu.h

function findicon($filename, $defaulticon)= \
    ifeqelse($filename, "", $defaulticon, \
    ifelsefile($filename, $filename, \
    ifelsefile("/usr/share/icons/mini/" $filename, "/usr/share/icons/mini/" $filename, \
    ifelsefile("/usr/share/icons/" $filename, "/usr/share/icons/" $filename, \
    ifelsefile("/usr/share/icons/hicolor/16x16/apps/" $filename, "/usr/share/icons/hicolor/16x16/apps/" $filename, \
    ifelsefile("/usr/share/icons/locolor/16x16/apps/" $filename, "/usr/share/icons/locolor/16x16/apps/" $filename, $defaulticon))))))\

supported
  x11=	"  prog \"" translate(lang(), title()) "\" " findicon($icon, "-") " " $command"\n"
  text= "  prog \"" translate(lang(), title()) "\" " findicon($icon, "-") " " term() "\n"
  wm=   "  restart \"" translate(lang(), title()) "\" " findicon($icon, "-") " " $command"\n"
  icewm="  prog \"" translate(lang(), title()) "\" " findicon($icon, "-") " " $command"\n"
endsupported

startmenu=ifneq($title,"Mandrake menu",ifroot("menu \"" translate(lang(), $title) "\" " findicon($icon, "default_section.png") " {\n","menu \"" translate(lang(),$title) "\" " findicon($icon, "default_section.png") " {\n"))
endmenu=ifneq($title,"Mandrake menu","}\n")
genmenu="menu"
submenutitle=""
#submenutitle="  menu \"" $title "\" folder {\n"
preoutput="prog \"SCREEN root shell\" screen rxvt -mod alt -C +sb -bg black -cr green -fg white -fn -*-fixed-medium-*-*-*-15-*-*-*-*-*-iso8859-2 -sl 10000 -title \"SCREEN-root-shell-iso-8859-2\" -n \"SCREEN-root-shell\" -e su --command=\"screen\" - root\nprog \"SCREEN user shell\" screen rxvt -mod alt -C +sb -bg black -cr green -fg white -fn -*-fixed-medium-*-*-*-15-*-*-*-*-*-iso8859-2 -sl 5000 -title \"SCREEN-user-shell-iso-8859-2\" -n \"SCREEN-user-shell\" -e screen -h 10000\nprog \"SCREEN small user shell\" screen rxvt -mod alt -C +sb -bg black -cr green -fg white -fn -misc-fixed-medium-r-normal--14-*-iso8859-2 -sl 5000 -title \"SCREEN-small-user-shell-iso-8859-2\" -n \"SCREEN-small-user-shell\" -e screen -h 10000\nprog \"RXVT\" rxvt-CLE rxvt -mod alt -C -sb -bg black -cr green -fg white -fn -*-fixed-medium-*-*-*-15-*-*-*-*-*-iso8859-2 -sl 10000 -title \"RXVT\" -n \"RXVT\"\nprog \"XTerm\" xterm.png xterm -C -bg black -cr green -fg grey -fn 9x15 -sl 2000\n"
rootprefix="/usr/X11R6/lib/X11/icewm/"
mainmenutitle="Mandrake menu"
treewalk="(M)"
userprefix=".icewm"
