1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 20:38:08 +01:00
Files
wmaker/debian/wmaker.menu-method
2009-08-24 11:55:20 +02:00

46 lines
1.2 KiB
Plaintext

#!/usr/bin/install-menu
#
# Generates Window Maker menus for all registered applications.
!include menu.h
compat="menu-1";
outputencoding="UTF-8"
genmenu="menu.hook"
rootprefix="/etc/X11/WindowMaker/"
userprefix=shell("echo -n /${GNUSTEP_USER_ROOT-GNUstep}") "/Library/WindowMaker/"
treewalk="(M)"
rootsection="/Debian"
function mytitle()=replacewith(title(),"\"","'")
function exec($action,$com)= \
" \"" mytitle() "\" " ifnempty($shortcut, "SHORTCUT " $shortcut " ") $action " " esc($com,"*") "\n"
supported
x11= exec("SHEXEC",$command)
wm= exec("RESTART",$command)
text= exec("SHEXEC",term())
wmaker= exec("",$command ifnempty($arg," " $arg))
endsupported
preoutput= "/* Automatically generated file. Do not edit (see /usr/share/doc/menu/menu.txt.gz) */\n\n#include \"wmmacros\"\n"
mainmenutitle=""
submenutitle= ""
startmenu= "\n" \
ifelse( \
title(), \
"\"" mytitle() "\" MENU", \
"Debian MENU\n\n#include <menu.prehook>" \
) \
"\n"
endmenu= ifelse( \
title(), \
"\"" mytitle() "\" END", \
"\n#include <menu.posthook>\n\nDebian END" \
) \
"\n"