#!/usr/sbin/install-menu # debian menu-method for golem # written by Ben Roberts # # instructions for use: # # Move this file to /etc/menu-methods or ~/.menu-methods (with the # execute bit set) and initialize with the command update-menus. # After that the menus are up-to-date as of the last time update-menus # was run (which is whenever a package that uses a menu entry gets # installed; but if the script is in a user's ~/.menu-methods they # have to run update-menus themselves, of course). # # This script generates a file called menudefs.hook (the way I wrote # it, in /usr/local/share/golem/plugins/simple_menus/, but one line # that can be changed) which just has one large submenu with the menu # tree in it. It needs to be .include'd in the simple_menus rc file # wherever the "Debian" submenu should go inside the root menu: # # load "simple_menus" { # param "rootmenu" "Title" { # # This includes the Debian Menu # .include "/usr/local/share/golem/plugins/simple_menus/menudefs.hook" # compat="menu-1"; !include menu.h compat="menu-2"; function f($com)=" param \"command\" \"" esc(title(),"\"") "\" { param \"dat\" \"exec " esc($com,"\"") "\"; }\n"; supported; x11= f($command); wm= " param \"restart\" \"" $title "\" { param \"dat\" \"" $command "\"; }\n"; pwm= " param \"" $command "\" \"" $title "\";\n"; text=f(term()); endsupported; startmenu="param \"submenu\" \"" $title "\" {\n"; rootprefix="/usr/local/share/golem/plugins/simple_menus/"; userprefix=".golem/plugins/simple_menus"; endmenu="}\n\n"; genmenu="menudefs.hook"; mainmenutitle="Debian"; treewalk="(M)";