home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 February / PCWorld_2000-02_cd.bin / live / etc / menu-methods / fvwm95
Text File  |  1998-10-18  |  3KB  |  69 lines

  1. #!/usr/sbin/install-menu
  2. #I need menu-1!
  3. #
  4. #NOTE: the first line of this script _must_ be
  5. # equal to "#!/usr/sbin/install-menu", otherwise update-menus
  6. # will feed this script old-compat-mode data.
  7. #
  8. #More info: /usr/doc/menu/README.
  9. #
  10. compat="menu-1"
  11. supported 
  12. #  fvwm2module="+ \"" escfirst($title,$hotkey,"&") \
  13. #           cond_surr($icon,"%","%") "\" " $command "\n"
  14.   fvwm95module="+ \"" escfirst($title,$hotkey,"&") \
  15.            cond_surr($icon,"%","%") "\" " $command "\n"
  16.   fvwmmodule= "+ \"" escfirst($title,$hotkey,"&") \
  17.            cond_surr($icon,"%","%") "\" Exec    " $command "\n"
  18.   wm=         "+ \"" escfirst($title,$hotkey,"&") \
  19.            cond_surr($icon,"%","%") "\" Restart " $command "\n"
  20.   x11fvwm2=  "+ \"" escfirst($title,$hotkey,"&") \
  21.            cond_surr($icon,"%","%") "\" Exec    " $command "\n"
  22.   x11=        "+ \"" escfirst($title,$hotkey,"&") \
  23.            cond_surr($icon,"%","%") "\" Exec    " $command  "\n"
  24.   text=       "+ \"" escfirst($title,$hotkey,"&") \
  25.            cond_surr($icon,"%","%") "\""  \
  26.             " Exec /usr/bin/X11/xterm -T \"" $title "\" -e " $command "\n"
  27. endsupported
  28.  
  29. # The following menu definitions are copied directly from fvwm2,
  30. # since the fvwm2 debian package had at the time a really
  31. # nice menu setup.  Don't you just love free software?
  32.  
  33. #BEGIN CRIBBED PORTION
  34. # Ok, "startmenu" is a little wacky, and comes in 4 parts:
  35. #  1. If this is running for a user, then we do a DestroyMenu to
  36. # clear out the system one. Furthermore, if we're dealing with the
  37. # top-level /Debian menu, then add a title for it (normally done in
  38. # system.fvwm2rc), and re-read the main-menu-pre.hooks whose results
  39. # we merrily blew away earlier.  This is so that the
  40. # main-menu-pre.hooks work for users as well as system-wide.  Of
  41. # course, none of this happens if we're running as root to produce the
  42. # system-wide menudef.hook file.
  43. #  2. We spit out an "AddToMenu /Foo/Bar/Baz" to start this menu.
  44. #  3. We add the title to the menu if this isn't the /Debian menu
  45. # (since that title comes from the system.fvwm2rc).
  46. #  4. We add a trailing newline to the lot.
  47. startmenu=   ifroot("", \
  48.                "DestroyMenu \"" $section "\"\n" \
  49.                ifeq($section, "/Debian", \
  50.                  "AddToMenu \"/Debian\" \"Main Menu\" Title\n" \
  51.                  "Read /etc/X11/fvwm2/main-menu-pre.hook\n" \
  52.                  "Read .fvwm2/main-menu-pre.hook\n")) \
  53.              "AddToMenu \"" $section "\"" \
  54.              ifnempty($title, " \"" $title "\" Title") \
  55.              "\n"
  56. endmenu=     "\n"
  57. submenutitle= "+ \"" escfirst($title,$hotkey,"&") \
  58.            cond_surr($icon,"%","%") "\" PopUp " $section "\n"
  59. #END CRIBBED PORTION
  60. genmenu=      "menudefs.hook"
  61. rootprefix=   "/etc/X11/fvwm95/"
  62. userprefix=   "/.fvwm95/"
  63. # I know it's the default, but just in case:
  64. treewalk=     "c(m)"
  65.  
  66. #If you want your fvwm95 sessions to be automatically restarted when you
  67. #upgrade your debian menus, uncomment the next line:
  68. #postrun="killall -USR1 /usr/X11R6/bin/fvwm95"
  69.