update from Han

This commit is contained in:
fluxgen 2002-12-17 16:42:20 +00:00
parent 6fd4093d4c
commit bc9afac2de

View file

@ -22,7 +22,7 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
# $Id: fluxbox-generate_menu,v 1.19 2002/12/16 11:34:06 fluxgen Exp $
# $Id: fluxbox-generate_menu,v 1.20 2002/12/17 16:42:20 fluxgen Exp $
WHOAMI=`whoami`
[ "$WHOAMI" = "root" ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin
@ -30,9 +30,15 @@ WHOAMI=`whoami`
# Functions
display_usage() {
cat <<EOF
Usage: fluxbox-generate_menu [-kgr] [-t terminal] [-w browser]
Usage: fluxbox-generate_menu [-kgrB] [-t terminal] [-w url] [-b browser]
[-m menu-title] [-p /path] [-n /path] [-q /path] [-o /path]
EOF
}
display_help() {
display_usage
cat <<EOF
Options:
-k Insert a kde menu
@ -40,7 +46,7 @@ Options:
-B enable backgroundmenu
-m Menu-title; default is "Fluxbox"
-r Don't remove empty menu-entries; Better for templates.
-r Don't remove empty menu-entries; for templates.
-o Outputfile; default is ~/.fluxbox/menu
-t Favourite terminal
-b Favourite browser
@ -60,14 +66,6 @@ Options:
EOF
}
display_help() {
cat <<EOF
This program generates a menu-file for fluxbox.
Use fluxbox-generate_menu -h for brief usage instructions.
EOF
}
display_authors() {
cat <<EOF
@ -167,9 +165,9 @@ while getopts ":Bkhragb:t:p:w:n:q:o:m:" COMMAND_LINE_ARGUMENT ; do
m) MENUTITLE=${OPTARG} ;;
w) HOMEPAGE=${OPTARG} ;;
r) REMOVE=no ;;
h) display_usage ; exit 0 ;;
h) display_help ; exit 0 ;;
a) display_authors ; exit 0 ;;
*) display_help ; exit 1 ;;
*) display_usage ; exit 1 ;;
esac
done
@ -488,8 +486,22 @@ case ${LC_ALL} in
esac
# Start of menu
cat << EOF > ${FILENAME}
# Generated by fluxbox-genereate_menu
#
# If you read this it means you want to edit this file manualy,
# so here are some usefull tips:
#
# - The -r option prevents removing of empty menu entries and makes
# thing much more readable.
#
# - To prevent any other app from overwriting your menu
# you can change the menu name in .fluxbox/init to:
# session.menuFile: /home/you/.fluxbox/my-menu
echo "[begin] (${MENUTITLE})" > ${FILENAME}
EOF
echo "[begin] (${MENUTITLE})" >> ${FILENAME}
append "[exec] (${DEFAULT_TERM}) {${DEFAULT_TERM}}"