#!/bin/bash # /usr/bin/wm-build-appdir-menu # Gilbert Ashley # this script can be used to generate a sub-menu of ROX AppDirs # for the WindowMaker menu. It expects a directory name as input. # An example menu entry for the plmenu (perl menu) looks like this: # (AppDirs, OPEN_MENU, "|| /usr/bin/wm-build-appdir-menu /usr/apps"), # Or, you can use the WPrefs application to add a 'Generated Submenu' # with the command: /usr/bin/wm-build-appdir-menu /usr/apps APPDIRS="$@" if [ "$APPDIRS" = "" ] ; then exit fi for DIR in $APPDIRS ; do echo "\"AppDirs\" MENU" for AppDir in $(ls -1 $DIR) ; do echo $AppDir EXEC $DIR/$AppDir/AppRun done echo "\"AppDirs\" END" done