Debian menu-method

Andre Canis (canis@cs.uni-bonn.de)
07 Feb 2000 14:12:47 +0100


I hope this will be useful to any Debian users running
Afterstep-1.7.x.


#!/usr/sbin/install-menu
#   -*- mode: shell-script; -*-
#I need menu-1!
#
#NOTE: the first line of this script _must_ be
# equal to "#!/usr/sbin/install-menu", otherwise update-menus
# will feed this script old-compat-mode data.
#
#More info: /usr/doc/menu/html.

# Modified from Debian afterstep menu-method
# by Andre Canis <canis@cs.uni-bonn.de>
#
# Put in /etc/menu-methods for system-wide menu
# (/usr/local/share/afterstep/start) or in ~/.menu-methods for
# user menu (~/G/L/A/start). You also may need to copy
# /etc/menu-methods/menu.h to ~/.menu-methods.
# Run update-menus to generate Debian entry in AS root menu.
#
# No guarantees! prerun and postrun rm's haven't deleted my
# home dir yet, but YMMV.

compat="menu-1"
!include menu.h

compat="menu-2"

# removed ifnempty($hotkey,"&" toupper($hotkey))
#  can't figure out how to do hotkeys properly...
# added MiniPixmap display
function mod($var,$com)=" " $var " \"" 
          title()
          "\" exec " $com "\n"
          ifnempty($icon," MiniPixmap \"" $icon "\"\n");

function ex($com)=mod("Exec",$com);

supported;
  asmodule=   mod("Module", $command);
  fvwmmodule= mod("Exec",   $command);
  wm=         mod("Restart",$command);
  x11fvwm=    ex($command);
  x11=        ex($command);
  text=       ex(term());
endsupported;

# start- and endmenu entries not needed because afterstep
# menu is a directory. submenutitle also removed.
startmenu="";
endmenu="";

# Standard preoutput breaks menu entries, removed
preoutput="";

# Clean up directory before making menu
prerun="rm -rf " prefix() "/Debian";

postrun="find " prefix() " -name \"nop\" -print | xargs rm";

# AfterStep start menu: single files containing the menu entries
# I coudn't turn off generating files for the submenu titles,
# so i just call them "nop" and they get removed by postrun.
genmenu=parent(replacewith($section," ","_"))
        "/" ifelse($command,replacewith($title," ","_"),"nop");

rootprefix="/usr/local/share/afterstep/start/";
userprefix="GNUstep/Library/AfterStep/start/";
mainmenutitle="Debian Menu";
--------------------------------------------------------------------
To unsubscribe from this mailing list, simply type the following at #
echo "unsubscribe as-users <your_email>" | mail majordomo@afterstep.org