2002-09-07 18:57:35 +00:00
|
|
|
|
#!/bin/sh
|
2002-11-12 19:19:14 +00:00
|
|
|
|
#
|
2002-09-07 18:57:35 +00:00
|
|
|
|
# generate_menu for Fluxbox
|
2002-11-12 19:19:14 +00:00
|
|
|
|
#
|
|
|
|
|
# Copyright (c) 2002 Han Boetes <han@mijncomputer.nl>
|
2002-09-07 18:57:35 +00:00
|
|
|
|
#
|
|
|
|
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
|
# copy of this software and associated documentation files (the "Software"),
|
|
|
|
|
# to deal in the Software without restriction, including without limitation
|
|
|
|
|
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
|
|
|
# and/or sell copies of the Software, and to permit persons to whom the
|
|
|
|
|
# Software is furnished to do so, subject to the following conditions:
|
|
|
|
|
#
|
|
|
|
|
# The above copyright notice and this permission notice shall be included in
|
|
|
|
|
# all copies or substantial portions of the Software.
|
|
|
|
|
#
|
|
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2002-11-19 06:21:45 +00:00
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
2002-09-07 18:57:35 +00:00
|
|
|
|
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
|
|
|
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
|
|
|
# DEALINGS IN THE SOFTWARE.
|
2002-11-12 19:19:14 +00:00
|
|
|
|
#
|
2003-08-17 13:30:35 +00:00
|
|
|
|
# $Id: fluxbox-generate_menu,v 1.50 2003/08/17 13:30:35 fluxgen Exp $
|
2003-02-22 18:03:15 +00:00
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Portability notes:
|
|
|
|
|
# To guarantee this script works on all platforms that support fluxbox
|
|
|
|
|
# please keep the following restrictions in mind:
|
|
|
|
|
#
|
2003-08-05 12:36:54 +00:00
|
|
|
|
# - don't use if ! command;, use command; if [ $? -ne 0 ];
|
|
|
|
|
# - don't use [ -e file ] use [ -r file ]
|
|
|
|
|
# - don't use $(), use ``
|
|
|
|
|
# - don't use ~, use ${HOME}
|
|
|
|
|
# - don't use id -u, use whoami
|
|
|
|
|
# - getopts won't work on all platforms, but the config-file can
|
|
|
|
|
# compensate for that.
|
|
|
|
|
# - various software like grep/sed/perl may be not present or not
|
|
|
|
|
# the version you have. for example grep '\W' only works on gnu-grep.
|
|
|
|
|
# Keep this in mind, use bare basic defaults.
|
|
|
|
|
# - Do _NOT_ suggest to use #!/bin/bash. Not everybody uses bash.
|
2003-08-07 10:35:19 +00:00
|
|
|
|
# Non portable features like getopts in this script can be achieved in
|
|
|
|
|
# other ways.
|
2003-02-22 18:03:15 +00:00
|
|
|
|
|
2002-09-07 18:57:35 +00:00
|
|
|
|
|
2002-11-29 13:39:37 +00:00
|
|
|
|
WHOAMI=`whoami`
|
2003-08-07 10:35:19 +00:00
|
|
|
|
[ "$WHOAMI" = root ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin
|
2002-10-19 14:34:08 +00:00
|
|
|
|
|
2002-09-07 18:57:35 +00:00
|
|
|
|
# Functions
|
2002-10-19 14:34:08 +00:00
|
|
|
|
display_usage() {
|
2003-08-07 10:35:19 +00:00
|
|
|
|
cat << EOF
|
2003-04-23 13:57:26 +00:00
|
|
|
|
Usage: fluxbox-generate_menu [-kgrBh] [-t terminal] [-w url] [-b browser]
|
|
|
|
|
[-m menu-title] [-o /path] [-u /path] [-p /path] [-n /path] [-q /path]
|
2002-12-17 16:42:20 +00:00
|
|
|
|
EOF
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
display_help() {
|
|
|
|
|
display_usage
|
2003-08-07 10:35:19 +00:00
|
|
|
|
cat << EOF
|
2002-12-17 16:42:20 +00:00
|
|
|
|
|
2002-10-19 14:34:08 +00:00
|
|
|
|
Options:
|
|
|
|
|
|
2002-11-19 06:21:45 +00:00
|
|
|
|
-k Insert a kde menu
|
|
|
|
|
-g Add a gnome menu
|
2002-12-14 23:58:13 +00:00
|
|
|
|
-B enable backgroundmenu
|
2003-08-02 14:26:45 +00:00
|
|
|
|
-r Don't remove empty menu-entries; for templates
|
2002-12-14 23:58:13 +00:00
|
|
|
|
|
2002-11-19 06:21:45 +00:00
|
|
|
|
-t Favourite terminal
|
2003-08-02 14:26:45 +00:00
|
|
|
|
-w Homepage for console-browsers. Default is fluxbox.org
|
2003-04-23 13:57:26 +00:00
|
|
|
|
-b Favourite browser
|
|
|
|
|
-m Menu-title; default is "Fluxbox"
|
|
|
|
|
-o Outputfile; default is ~/.fluxbox/menu
|
2002-12-29 10:37:47 +00:00
|
|
|
|
-u user sub-menu; default is ~/.fluxbox/usermenu
|
2002-12-14 23:58:13 +00:00
|
|
|
|
|
2002-11-19 06:21:45 +00:00
|
|
|
|
-h Display this help
|
|
|
|
|
-a Display the authors of this script
|
|
|
|
|
|
2002-11-12 19:19:14 +00:00
|
|
|
|
Only for packagers:
|
2002-10-22 09:26:45 +00:00
|
|
|
|
|
2003-08-02 14:26:45 +00:00
|
|
|
|
-p prefix; default is /usr/local
|
|
|
|
|
-n Gnome-prefix; /opt, /usr and /usr/local autodetected
|
|
|
|
|
-q KDE-prefix; idem dito
|
2002-10-19 14:34:08 +00:00
|
|
|
|
|
2002-12-29 10:37:47 +00:00
|
|
|
|
|
|
|
|
|
Files:
|
2003-01-23 07:08:24 +00:00
|
|
|
|
~/.fluxbux/usermenu your own submenu which will be included in the menu
|
2002-12-29 10:37:47 +00:00
|
|
|
|
~/.fluxbox/menuconfig rc file for fluxbox-generate_menu
|
|
|
|
|
|
2002-10-19 14:34:08 +00:00
|
|
|
|
EOF
|
2002-09-07 18:57:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
2002-10-19 14:34:08 +00:00
|
|
|
|
display_authors() {
|
2003-08-07 10:35:19 +00:00
|
|
|
|
cat << EOF
|
2002-10-19 14:34:08 +00:00
|
|
|
|
|
|
|
|
|
fluxbox-generate_menu was brought to you by:
|
2002-11-04 11:38:51 +00:00
|
|
|
|
|
2002-11-29 13:39:37 +00:00
|
|
|
|
Henrik Kinnunen: Project leader.
|
2002-11-19 06:21:45 +00:00
|
|
|
|
Han Boetes: Packaging, debugging and scripts.
|
2003-04-14 09:23:40 +00:00
|
|
|
|
Simon Bowden: Cleanups and compatibility for sun.
|
2002-11-19 06:21:45 +00:00
|
|
|
|
Jeramy B. Smith: Packaging assistance, gnome and kde menu system.
|
|
|
|
|
Filippo Pappalardo: Italian locales and -t option.
|
|
|
|
|
$WHOAMI: Innocent bystander.
|
2002-11-04 11:38:51 +00:00
|
|
|
|
|
2002-10-19 14:34:08 +00:00
|
|
|
|
EOF
|
2002-09-07 18:57:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
2002-12-29 10:37:47 +00:00
|
|
|
|
# ugly code for solaris compat.
|
2003-07-17 23:39:34 +00:00
|
|
|
|
case `uname` in
|
2003-06-10 12:14:35 +00:00
|
|
|
|
Linux|*BSD)
|
|
|
|
|
find_it() {
|
|
|
|
|
which $1 > /dev/null 2>&1 && shift && $*
|
2003-08-07 10:35:19 +00:00
|
|
|
|
}
|
2003-06-10 12:14:35 +00:00
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
find_it() {
|
|
|
|
|
file=`which $1 2> /dev/null`
|
|
|
|
|
if [ -x "$file" ]; then
|
|
|
|
|
if [ $# -gt 1 ]; then
|
|
|
|
|
shift
|
|
|
|
|
$*
|
|
|
|
|
fi
|
|
|
|
|
return 0
|
|
|
|
|
else
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
;;
|
|
|
|
|
esac
|
2002-10-19 08:53:40 +00:00
|
|
|
|
|
2002-09-07 18:57:35 +00:00
|
|
|
|
append() {
|
2003-08-04 14:13:33 +00:00
|
|
|
|
echo " $*" >> ${MENUFILENAME}
|
2002-09-07 18:57:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
append_menu() {
|
2003-08-04 14:13:33 +00:00
|
|
|
|
echo "$*" >> ${MENUFILENAME}
|
2002-09-07 18:57:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
append_submenu() {
|
2003-08-04 14:13:33 +00:00
|
|
|
|
[ "${REMOVE}" ] && echo >> ${MENUFILENAME} # only an empty line in templates
|
2002-10-19 14:34:08 +00:00
|
|
|
|
append_menu "[submenu] ($1)"
|
2002-09-07 18:57:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
append_menu_end() {
|
2003-08-07 10:35:19 +00:00
|
|
|
|
append_menu '[end]'
|
2003-08-04 14:13:33 +00:00
|
|
|
|
[ "${REMOVE}" ] && echo >> ${MENUFILENAME} # only an empty line in templates
|
2002-09-07 18:57:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
menu_entry() {
|
2003-08-02 14:26:45 +00:00
|
|
|
|
if [ -f "$1" ]; then
|
2003-08-05 12:36:54 +00:00
|
|
|
|
# space&tab here
|
|
|
|
|
entry_name=`grep '^[ ]*Name=' "$1" | head -1 | cut -d = -f 2`
|
|
|
|
|
entry_exec=`grep '^[ ]*Exec=' "$1" | head -1 | cut -d = -f 2`
|
|
|
|
|
if [ -n "$entry_name" -a -n "$entry_exec" ]; then
|
|
|
|
|
append "[exec] ($entry_name) {$entry_exec}"
|
|
|
|
|
fi
|
2002-10-19 14:34:08 +00:00
|
|
|
|
fi
|
2002-09-07 18:57:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
menu_entry_dir() {
|
2003-08-02 14:26:45 +00:00
|
|
|
|
for b in "$*"/*.desktop; do
|
2002-11-19 06:21:45 +00:00
|
|
|
|
menu_entry "${b}"
|
2002-10-19 14:34:08 +00:00
|
|
|
|
done
|
2002-09-07 18:57:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
2003-08-05 12:36:54 +00:00
|
|
|
|
menu_entry_dircheck() {
|
|
|
|
|
if [ -d "$*" ]; then
|
|
|
|
|
menu_entry_dir "$*"
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2003-08-02 14:26:45 +00:00
|
|
|
|
|
|
|
|
|
# recursively build a menu from the listed directories
|
|
|
|
|
# the dirs are merged
|
|
|
|
|
recurse_dir_menu () {
|
|
|
|
|
ls "$@"/ 2>/dev/null | sort | uniq | while read name; do
|
|
|
|
|
for dir in "$@"; do
|
|
|
|
|
if [ -n "$name" -a -d "$dir/$name" ]; then
|
|
|
|
|
# recurse
|
|
|
|
|
append_submenu "${name}"
|
|
|
|
|
# unfortunately, this is messy since we can't easily expand
|
|
|
|
|
# them all. Only allow for 3 atm. Add more if needed
|
|
|
|
|
recurse_dir_menu ${1:+"$1/$name"} ${2:+"$2/$name"} ${3:+"$3/$name"}
|
|
|
|
|
append_menu_end
|
|
|
|
|
break; # found one, it'll pick up all the rest
|
|
|
|
|
fi
|
|
|
|
|
# ignore it if it is a file, since menu_entry_dir picks those up
|
|
|
|
|
done
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# Make entries for current dir after all submenus
|
|
|
|
|
for dir in "$@"; do
|
|
|
|
|
menu_entry_dircheck "${dir}"
|
|
|
|
|
done
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2002-11-04 11:38:51 +00:00
|
|
|
|
normal_find() {
|
2002-11-19 06:21:45 +00:00
|
|
|
|
while [ "$1" ]; do
|
|
|
|
|
find_it $1 append "[exec] ($1) {$1}"
|
|
|
|
|
shift
|
2002-11-04 11:38:51 +00:00
|
|
|
|
done
|
|
|
|
|
}
|
|
|
|
|
|
2002-11-12 19:19:14 +00:00
|
|
|
|
clean_up() {
|
|
|
|
|
# -e "/^$/d" -e "/^$/d"
|
2003-08-04 14:13:33 +00:00
|
|
|
|
cat ${MENUFILENAME} | sed -e "/^\[submenu]/{
|
2002-11-12 19:19:14 +00:00
|
|
|
|
N
|
|
|
|
|
/^\[submenu].*\n\[end]/d
|
2003-08-04 14:13:33 +00:00
|
|
|
|
}" > ${MENUFILENAME}.tmp
|
|
|
|
|
mv -f ${MENUFILENAME}.tmp ${MENUFILENAME}
|
2002-11-12 19:19:14 +00:00
|
|
|
|
}
|
2002-11-04 11:38:51 +00:00
|
|
|
|
|
2003-01-23 07:08:24 +00:00
|
|
|
|
# menu defaults (if translation forget to set one of them)
|
2003-02-22 18:03:15 +00:00
|
|
|
|
BACKGROUNDMENU='Backgrounds'
|
|
|
|
|
BACKGROUNDMENUTITLE='Set the Background'
|
|
|
|
|
BROWSERMENU='Browsers'
|
|
|
|
|
CONFIGUREMENU='Configure'
|
|
|
|
|
EDITORMENU='Editors'
|
|
|
|
|
EXITITEM='Exit'
|
|
|
|
|
FBSETTINGSMENU='fluxbox menu'
|
|
|
|
|
FILEUTILSMENU='File utils'
|
|
|
|
|
GAMESMENU='Games'
|
|
|
|
|
GNOMEMENUTEXT='Gnome-menus'
|
|
|
|
|
GRAPHICMENU='Graphics'
|
|
|
|
|
KDEMENUTEXT='KDE-menus'
|
|
|
|
|
MISCMENU='Misc'
|
|
|
|
|
MULTIMEDIAMENU='Multimedia'
|
|
|
|
|
MUSICMENU='Music'
|
|
|
|
|
NETMENU='Net'
|
|
|
|
|
OFFICEMENU='Office'
|
|
|
|
|
RELOADITEM='Reload config'
|
|
|
|
|
RESTARTITEM='Restart'
|
|
|
|
|
STYLEMENUTITLE='Choose a style...'
|
|
|
|
|
SYSTEMSTYLES='System Styles'
|
|
|
|
|
TERMINALMENU='Terminals'
|
|
|
|
|
USERSTYLES='User Styles'
|
2003-05-12 19:55:07 +00:00
|
|
|
|
VIDEOMENU='Video'
|
2003-06-10 12:14:35 +00:00
|
|
|
|
WINDOWMANAGERS='Window Managers'
|
2003-02-22 18:03:15 +00:00
|
|
|
|
WORKSPACEMENU='Workspace List'
|
|
|
|
|
XUTILSMENU='X-utils'
|
2003-01-23 07:08:24 +00:00
|
|
|
|
|
|
|
|
|
# Check translation
|
|
|
|
|
case ${LC_ALL} in
|
|
|
|
|
ru_RU*) #Russian locales
|
2003-02-22 18:03:15 +00:00
|
|
|
|
#BACKGROUNDMENU='Backgrounds'
|
|
|
|
|
#BACKGROUNDMENUTITLE='Set the Background'
|
|
|
|
|
#FILEUTILSMENU='File utils'
|
|
|
|
|
#OFFICEMENU='Office'
|
|
|
|
|
#SYSTEMSTYLES='<27><><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
#USERSTYLES='<27><><EFBFBD><EFBFBD><EFBFBD>'
|
2003-06-10 12:14:35 +00:00
|
|
|
|
#WINDOWMANAGERS='WindowManagers'
|
2003-02-22 18:03:15 +00:00
|
|
|
|
BROWSERMENU='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
CONFIGUREMENU='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
EDITORMENU='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
EXITITEM='<27><><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
FBSETTINGSMENU='FB-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
GNOMEMENUTEXT='Gnome-<2D><><EFBFBD><EFBFBD>'
|
|
|
|
|
GRAPHICMENU='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
KDEMENUTEXT='KDE-<2D><><EFBFBD><EFBFBD>'
|
|
|
|
|
MISCMENU='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
MUSICMENU='<27><><EFBFBD><EFBFBD>'
|
|
|
|
|
NETMENU='<27><><EFBFBD><EFBFBD>'
|
|
|
|
|
RELOADITEM='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
RESTARTITEM='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
STYLEMENUTITLE='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
TERMINALMENU='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
WORKSPACEMENU='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
XUTILSMENU='X-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
2003-01-23 07:08:24 +00:00
|
|
|
|
;;
|
|
|
|
|
de_DE*) # german locales
|
2003-06-10 12:14:35 +00:00
|
|
|
|
#WINDOWMANAGERS='Window Managers'
|
2003-02-25 07:44:16 +00:00
|
|
|
|
BACKGROUNDMENU='Hintergrundbilder'
|
|
|
|
|
BACKGROUNDMENUTITLE='Hintergrundbild setzen'
|
2003-02-22 18:03:15 +00:00
|
|
|
|
BROWSERMENU='Internet-Browser'
|
|
|
|
|
CONFIGUREMENU='Einstellungen'
|
|
|
|
|
EDITORMENU='Editoren'
|
|
|
|
|
EXITITEM='Beenden'
|
|
|
|
|
FBSETTINGSMENU='Fluxbox-Einstellungen'
|
2003-02-25 07:44:16 +00:00
|
|
|
|
FILEUTILSMENU='Datei-Utilities'
|
2003-02-22 18:03:15 +00:00
|
|
|
|
GNOMEMENUTEXT='Gnome-Menues'
|
|
|
|
|
GRAPHICMENU='Grafik'
|
|
|
|
|
KDEMENUTEXT='Kde-Menues'
|
|
|
|
|
MISCMENU='Sonstiges'
|
|
|
|
|
MUSICMENU='Musik'
|
|
|
|
|
NETMENU='Netzwerk'
|
2003-02-25 07:44:16 +00:00
|
|
|
|
OFFICEMENU='Bueroprogramme'
|
2003-02-22 18:03:15 +00:00
|
|
|
|
RELOADITEM='Konfiguration neu laden'
|
|
|
|
|
RESTARTITEM='Neustarten'
|
|
|
|
|
STYLEMENUTITLE='Einen Stil auswaehlen...'
|
2003-02-25 07:44:16 +00:00
|
|
|
|
SYSTEMSTYLES='Systemweite Stile'
|
2003-02-22 18:03:15 +00:00
|
|
|
|
TERMINALMENU='Terminals'
|
2003-02-25 07:44:16 +00:00
|
|
|
|
USERSTYLES='Eigene Stile'
|
2003-02-22 18:03:15 +00:00
|
|
|
|
WORKSPACEMENU='Arbeitsflaechenliste'
|
|
|
|
|
XUTILSMENU='X-Anwendungen'
|
2003-01-23 07:08:24 +00:00
|
|
|
|
;;
|
|
|
|
|
sv_SE*) #Swedish locales
|
2003-02-22 18:03:15 +00:00
|
|
|
|
#BACKGROUNDMENU='Backgrounds'
|
|
|
|
|
#BACKGROUNDMENUTITLE='Set the Background'
|
|
|
|
|
#FILEUTILSMENU='File utils'
|
|
|
|
|
#OFFICEMENU='Office'
|
|
|
|
|
#SYSTEMSTYLES='Stiler'
|
|
|
|
|
#USERSTYLES='Stiler'
|
2003-06-10 12:14:35 +00:00
|
|
|
|
#WINDOWMANAGERS='Window Managers'
|
2003-02-22 18:03:15 +00:00
|
|
|
|
BROWSERMENU='Browsers'
|
|
|
|
|
CONFIGUREMENU='Konfiguration'
|
|
|
|
|
EDITORMENU='Editorer'
|
|
|
|
|
EXITITEM='Exit'
|
|
|
|
|
FBSETTINGSMENU='FB-inst<73>llningar'
|
|
|
|
|
GNOMEMENUTEXT='Gnome-menyer'
|
|
|
|
|
GRAPHICMENU='Grafik'
|
|
|
|
|
KDEMENUTEXT='KDE-menyer'
|
|
|
|
|
MISCMENU='Blandat'
|
|
|
|
|
MUSICMENU='Musik'
|
|
|
|
|
NETMENU='Net'
|
|
|
|
|
RELOADITEM='Ladda om konfig'
|
|
|
|
|
RESTARTITEM='Starta om'
|
|
|
|
|
STYLEMENUTITLE='V<>lj en stil'
|
|
|
|
|
TERMINALMENU='Terminaler'
|
|
|
|
|
WORKSPACEMENU='Arbetsytor'
|
|
|
|
|
XUTILSMENU='X-program'
|
2003-01-23 07:08:24 +00:00
|
|
|
|
;;
|
|
|
|
|
nl_NL*) #Nederlandse locales
|
2003-02-22 18:03:15 +00:00
|
|
|
|
BACKGROUNDMENU='Achtergrond'
|
|
|
|
|
BACKGROUNDMENUTITLE='Kies een achtergrond'
|
|
|
|
|
BROWSERMENU='Browsers'
|
|
|
|
|
CONFIGUREMENU='Instellingen'
|
|
|
|
|
EDITORMENU='Editors'
|
|
|
|
|
EXITITEM='Afsluiten'
|
|
|
|
|
FBSETTINGSMENU='FB-Instellingen'
|
|
|
|
|
FILEUTILSMENU='Verkenners'
|
|
|
|
|
GNOMEMENUTEXT='Gnome-menu'
|
|
|
|
|
GRAPHICMENU='Grafisch'
|
|
|
|
|
KDEMENUTEXT='KDE-menu'
|
|
|
|
|
MISCMENU='Onregelmatig'
|
|
|
|
|
MUSICMENU='Muziek'
|
|
|
|
|
NETMENU='Net'
|
|
|
|
|
OFFICEMENU='Office'
|
|
|
|
|
RELOADITEM='Vernieuw instellingen'
|
|
|
|
|
RESTARTITEM='Restart'
|
|
|
|
|
STYLEMENUTITLE='Kies een styl'
|
|
|
|
|
SYSTEMSTYLES='Systeem Stylen'
|
|
|
|
|
TERMINALMENU='Terminals'
|
|
|
|
|
USERSTYLES='Gebruikers Stylen'
|
2003-06-10 12:14:35 +00:00
|
|
|
|
WINDOWMANAGERS='Window Managers'
|
2003-07-03 13:05:38 +00:00
|
|
|
|
WORKSPACEMENU='Werkveld menu'
|
2003-02-22 18:03:15 +00:00
|
|
|
|
XUTILSMENU='X-utils'
|
2003-01-23 07:08:24 +00:00
|
|
|
|
;;
|
|
|
|
|
fi_FI*) #Finnish locales
|
2003-07-03 13:05:38 +00:00
|
|
|
|
BACKGROUNDMENU='Taustat'
|
|
|
|
|
BACKGROUNDMENUTITLE='M<><4D>rit<69> tausta'
|
2003-02-22 18:03:15 +00:00
|
|
|
|
BROWSERMENU='Selaimet'
|
|
|
|
|
CONFIGUREMENU='Konfigurointi'
|
|
|
|
|
EDITORMENU='Editorit'
|
|
|
|
|
EXITITEM='Lopeta'
|
|
|
|
|
FBSETTINGSMENU='FB:n Asetukset'
|
2003-07-03 13:05:38 +00:00
|
|
|
|
FILEUTILSMENU='Tiedostoapuohjelmat'
|
2003-02-22 18:03:15 +00:00
|
|
|
|
GNOMEMENUTEXT='Gnomen valikot'
|
|
|
|
|
GRAPHICMENU='Grafiikka'
|
|
|
|
|
KDEMENUTEXT='KDE:n valikot'
|
|
|
|
|
MISCMENU='Sekalaista'
|
|
|
|
|
MUSICMENU='Musikki'
|
|
|
|
|
NETMENU='Verkko'
|
2003-07-03 13:05:38 +00:00
|
|
|
|
OFFICEMENU='Toimistoty<74>kalut'
|
2003-02-22 18:03:15 +00:00
|
|
|
|
RELOADITEM='P<>ivit<69>'
|
|
|
|
|
RESTARTITEM='K<>ynnist<73> uudelleen'
|
|
|
|
|
STYLEMENUTITLE='Valitse tyyli'
|
2003-07-03 13:05:38 +00:00
|
|
|
|
SYSTEMSTYLES='J<>rjestelm<6C>n tyylit'
|
2003-02-22 18:03:15 +00:00
|
|
|
|
TERMINALMENU='Terminaalit'
|
2003-07-03 13:05:38 +00:00
|
|
|
|
USERSTYLES='K<>ytt<74>j<EFBFBD>n tyylit'
|
|
|
|
|
WINDOWMANAGERS='Ikkunanhallintaohjelmat'
|
2003-02-22 18:03:15 +00:00
|
|
|
|
WORKSPACEMENU='Ty<54>aluet'
|
|
|
|
|
XUTILSMENU='X-Ohjelmat'
|
2003-01-23 07:08:24 +00:00
|
|
|
|
;;
|
|
|
|
|
ja_JP*) #Japanese locales
|
2003-02-22 18:03:15 +00:00
|
|
|
|
#BACKGROUNDMENU='Backgrounds'
|
|
|
|
|
#BACKGROUNDMENUTITLE='Set the Background'
|
|
|
|
|
#FILEUTILSMENU='File utils'
|
|
|
|
|
#OFFICEMENU='Office'
|
|
|
|
|
#SYSTEMSTYLES='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
#USERSTYLES='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
2003-06-10 12:14:35 +00:00
|
|
|
|
#WINDOWMANAGERS='Window Managers'
|
2003-02-22 18:03:15 +00:00
|
|
|
|
BROWSERMENU='<27>֥饦<D6A5><E9A5A6>'
|
|
|
|
|
CONFIGUREMENU='<27><><EFBFBD><EFBFBD>'
|
|
|
|
|
EDITORMENU='<27><><EFBFBD>ǥ<EFBFBD><C7A5><EFBFBD>'
|
|
|
|
|
EXITITEM='<27><>λ'
|
|
|
|
|
FBSETTINGSMENU='Fluxbox<6F><78><EFBFBD><EFBFBD>'
|
|
|
|
|
GNOMEMENUTEXT='Gnome<6D><65><EFBFBD>˥塼'
|
|
|
|
|
GRAPHICMENU='<27><><EFBFBD><EFBFBD>'
|
|
|
|
|
KDEMENUTEXT='KDE<44><45><EFBFBD>˥塼'
|
|
|
|
|
MISCMENU='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
MUSICMENU='<27><><EFBFBD><EFBFBD>'
|
|
|
|
|
NETMENU='<27>ͥåȥ<C8A5><EFA1BC>'
|
|
|
|
|
RELOADITEM='<27><><EFBFBD>ɤ߹<C9A4><DFB9><EFBFBD>'
|
|
|
|
|
RESTARTITEM='<27>Ƶ<EFBFBD>ư'
|
|
|
|
|
STYLEMENUTITLE='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...'
|
|
|
|
|
TERMINALMENU='<27><><EFBFBD><EFBFBD><EFBFBD>ߥʥ<DFA5>'
|
|
|
|
|
WORKSPACEMENU='<27><EFBFBD><EFA1BC><EFBFBD><EFBFBD><EFBFBD>ڡ<EFBFBD><DAA1><EFBFBD>'
|
|
|
|
|
XUTILSMENU='X<>桼<EFBFBD>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD>ƥ<EFBFBD>'
|
2003-01-23 07:08:24 +00:00
|
|
|
|
;;
|
|
|
|
|
fr_FR*) # french locales
|
2003-06-22 12:50:03 +00:00
|
|
|
|
BACKGROUNDMENU="Fond d'<27>cran"
|
|
|
|
|
BACKGROUNDMENUTITLE="Changer le fond d'<27>cran"
|
2003-02-22 18:03:15 +00:00
|
|
|
|
BROWSERMENU='Navigateurs'
|
|
|
|
|
CONFIGUREMENU='Configurer'
|
|
|
|
|
EDITORMENU='Editeurs'
|
|
|
|
|
EXITITEM='Sortir'
|
2003-06-22 12:50:03 +00:00
|
|
|
|
FBSETTINGSMENU='Configurer Fluxbox'
|
|
|
|
|
FILEUTILSMENU='Outils fichiers'
|
|
|
|
|
GNOMEMENUTEXT='Menus Gnome'
|
2003-02-22 18:03:15 +00:00
|
|
|
|
GRAPHICMENU='Graphisme'
|
2003-06-22 12:50:03 +00:00
|
|
|
|
KDEMENUTEXT='Menus KDE'
|
|
|
|
|
MISCMENU='Divers'
|
2003-02-22 18:03:15 +00:00
|
|
|
|
MUSICMENU='Musique'
|
2003-06-22 12:50:03 +00:00
|
|
|
|
NETMENU='R<>seau'
|
|
|
|
|
OFFICEMENU='Bureautique'
|
|
|
|
|
RELOADITEM='Recharger la configuration'
|
|
|
|
|
RESTARTITEM='Red<65>marrer Fluxbox'
|
2003-02-22 18:03:15 +00:00
|
|
|
|
STYLEMENUTITLE='Choisir un style...'
|
2003-06-22 12:50:03 +00:00
|
|
|
|
SYSTEMSTYLES='Styles Systeme'
|
2003-02-22 18:03:15 +00:00
|
|
|
|
TERMINALMENU='Terminaux'
|
2003-06-22 12:50:03 +00:00
|
|
|
|
USERSTYLES='Styles Utilisateur'
|
|
|
|
|
WINDOWMANAGERS='Gestionnaires de fen<65>tres'
|
2003-02-22 18:03:15 +00:00
|
|
|
|
WORKSPACEMENU='Liste des bureaux'
|
2003-06-22 12:50:03 +00:00
|
|
|
|
XUTILSMENU='Outils X'
|
2003-01-23 07:08:24 +00:00
|
|
|
|
;;
|
|
|
|
|
it_IT*) # italian locales
|
2003-02-22 18:03:15 +00:00
|
|
|
|
#BACKGROUNDMENU='Backgrounds'
|
|
|
|
|
#BACKGROUNDMENUTITLE='Set the Background'
|
|
|
|
|
#FILEUTILSMENU='File utils'
|
|
|
|
|
#OFFICEMENU='Office'
|
|
|
|
|
#SYSTEMSTYLES='Stile'
|
|
|
|
|
#USERSTYLES='Stile'
|
2003-06-10 12:14:35 +00:00
|
|
|
|
#WINDOWMANAGERS='Window Managers'
|
2003-02-22 18:03:15 +00:00
|
|
|
|
BROWSERMENU='Browsers'
|
|
|
|
|
CONFIGUREMENU='Configurazione'
|
|
|
|
|
EDITORMENU='Editori'
|
|
|
|
|
EXITITEM='Esci'
|
|
|
|
|
FBSETTINGSMENU='Preferenze'
|
|
|
|
|
GAMESMENU='Giochi'
|
|
|
|
|
GNOMEMENUTEXT='Gnome'
|
|
|
|
|
GRAPHICMENU='Grafica'
|
|
|
|
|
KDEMENUTEXT='KDE'
|
|
|
|
|
MISCMENU='Varie'
|
|
|
|
|
MUSICMENU='Musica'
|
|
|
|
|
NETMENU='Internet'
|
|
|
|
|
RELOADITEM='Rileggi la configurazione'
|
|
|
|
|
RESTARTITEM='Riavvia'
|
|
|
|
|
STYLEMENUTITLE='Scegli uno stile'
|
|
|
|
|
TERMINALMENU='Terminali'
|
|
|
|
|
WORKSPACEMENU='Aree di lavoro'
|
|
|
|
|
XUTILSMENU='X-utils'
|
2003-01-23 07:08:24 +00:00
|
|
|
|
;;
|
|
|
|
|
ro_RO*) # Romanian locales
|
2003-02-22 18:03:15 +00:00
|
|
|
|
#FILEUTILSMENU='File utils'
|
|
|
|
|
#OFFICEMENU='Office'
|
|
|
|
|
#RESTARTITEM='Restart'
|
2003-06-10 12:14:35 +00:00
|
|
|
|
#WINDOWMANAGERS='WindowManagers'
|
2003-02-22 18:03:15 +00:00
|
|
|
|
BACKGROUNDMENU='Fundaluri'
|
|
|
|
|
BACKGROUNDMENUTITLE='Alege fundalul'
|
|
|
|
|
BROWSERMENU='Navigatoare'
|
|
|
|
|
CONFIGUREMENU='Configurare'
|
|
|
|
|
EDITORMENU='Editoare'
|
|
|
|
|
EXITITEM='Iesire'
|
|
|
|
|
FBSETTINGSMENU='Meniul Fluxbox'
|
|
|
|
|
GAMESMENU='Jocuri'
|
|
|
|
|
GNOMEMENUTEXT='Meniu Gnome'
|
|
|
|
|
GRAPHICMENU='Grafica'
|
|
|
|
|
KDEMENUTEXT='Meniu KDE'
|
|
|
|
|
MISCMENU='Diverse'
|
|
|
|
|
MULTIMEDIAMENU='Multimedia'
|
|
|
|
|
MUSICMENU='Muzica'
|
|
|
|
|
NETMENU='Net'
|
|
|
|
|
RELOADITEM='Reincarca configuratia'
|
|
|
|
|
STYLEMENUTITLE='Alege un stil...'
|
|
|
|
|
SYSTEMSTYLES='Stiluri sistem'
|
|
|
|
|
TERMINALMENU='Terminale'
|
|
|
|
|
USERSTYLES='Stiluri utilizator'
|
|
|
|
|
WORKSPACEMENU='Lista workspace-uri'
|
|
|
|
|
XUTILSMENU='Utilitare X'
|
2003-01-23 07:08:24 +00:00
|
|
|
|
;;
|
|
|
|
|
es_ES*) # spanish locales
|
2003-02-22 18:03:15 +00:00
|
|
|
|
#FILEUTILSMENU='File utils'
|
2003-06-10 12:14:35 +00:00
|
|
|
|
#WINDOWMANAGERS='WindowManagers'
|
2003-02-22 18:03:15 +00:00
|
|
|
|
BACKGROUNDMENU='Fondos'
|
|
|
|
|
BACKGROUNDMENUTITLE='Seleccionar Fondo'
|
|
|
|
|
BROWSERMENU='Navegadores'
|
|
|
|
|
CONFIGUREMENU='Configurar'
|
|
|
|
|
EDITORMENU='Editores'
|
|
|
|
|
EXITITEM='Salir'
|
|
|
|
|
FBSETTINGSMENU='Men<65> fluxbox'
|
|
|
|
|
GAMESMENU='Juegos'
|
|
|
|
|
GNOMEMENUTEXT='Men<65>s Gnome'
|
|
|
|
|
GRAPHICMENU='Gr<47>ficos'
|
|
|
|
|
KDEMENUTEXT='Men<65>s KDE'
|
|
|
|
|
MISCMENU='Varios'
|
|
|
|
|
MULTIMEDIAMENU='Multimedia'
|
|
|
|
|
MUSICMENU='M<>sica'
|
|
|
|
|
NETMENU='Red'
|
|
|
|
|
OFFICEMENU='Oficina'
|
|
|
|
|
RELOADITEM='Reconfigurar'
|
|
|
|
|
RESTARTITEM='Reiniciar'
|
|
|
|
|
STYLEMENUTITLE='Escoge un Estilo...'
|
|
|
|
|
SYSTEMSTYLES='Estilos del Sistema'
|
|
|
|
|
TERMINALMENU='Terminales'
|
|
|
|
|
USERSTYLES='Estilos del Usuario'
|
|
|
|
|
WORKSPACEMENU='Lista de Escritorios'
|
|
|
|
|
XUTILSMENU='Utilidades X'
|
2003-01-23 07:08:24 +00:00
|
|
|
|
;;
|
|
|
|
|
pl_PL*) # Polish locales
|
2003-02-22 18:03:15 +00:00
|
|
|
|
#FILEUTILSMENU='File utils'
|
2003-06-10 12:14:35 +00:00
|
|
|
|
#WINDOWMANAGERS='WindowManagers'
|
2003-02-22 18:03:15 +00:00
|
|
|
|
BACKGROUNDMENU='Tapety'
|
|
|
|
|
BACKGROUNDMENUTITLE='Ustaw tapet?'
|
|
|
|
|
BROWSERMENU='Przegl?darki'
|
|
|
|
|
CONFIGUREMENU='Konfiguracja'
|
|
|
|
|
EDITORMENU='Edytory'
|
|
|
|
|
EXITITEM='Wyj?cie'
|
|
|
|
|
FBSETTINGSMENU='Menu Fluxbox'
|
|
|
|
|
GAMESMENU='Gry'
|
|
|
|
|
GNOMEMENUTEXT='Menu Gnome'
|
|
|
|
|
GRAPHICMENU='Grafika'
|
|
|
|
|
KDEMENUTEXT='Menu KDE'
|
|
|
|
|
MISCMENU='R<>?ne'
|
|
|
|
|
MULTIMEDIAMENU='Multimedia'
|
|
|
|
|
MUSICMENU='Muzyka'
|
|
|
|
|
NETMENU='Sie?'
|
|
|
|
|
OFFICEMENU='Aplikacje biurowe'
|
|
|
|
|
RELOADITEM='Od?wie? konfiguracj?'
|
|
|
|
|
RESTARTITEM='Restart'
|
|
|
|
|
STYLEMENUTITLE='Wybierz styl...'
|
|
|
|
|
SYSTEMSTYLES='Style systemowe'
|
|
|
|
|
TERMINALMENU='Terminale'
|
|
|
|
|
USERSTYLES='Style u?ytkownika'
|
|
|
|
|
WORKSPACEMENU='Lista pulpit<69>w'
|
|
|
|
|
XUTILSMENU='Narz?dzia X'
|
2003-01-23 07:08:24 +00:00
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
|
2002-12-20 09:02:02 +00:00
|
|
|
|
# Set Defaults
|
2003-08-04 14:13:33 +00:00
|
|
|
|
MENUFILENAME="${MENUFILENAME:=${HOME}/.fluxbox/menu}"
|
2003-04-14 09:23:40 +00:00
|
|
|
|
MENUTITLE="${MENUTITLE:=Fluxbox}"
|
|
|
|
|
HOMEPAGE="${HOMEPAGE:=fluxbox.org}"
|
|
|
|
|
USERMENU="${USERMENU:=${HOME}/.fluxbox/usermenu}"
|
2002-12-20 09:02:02 +00:00
|
|
|
|
|
2002-12-29 10:37:47 +00:00
|
|
|
|
# Read the menuconfig file if it exists or else create it.
|
2003-04-14 09:23:40 +00:00
|
|
|
|
# But not during install time, use envvar for sun
|
2003-08-07 10:35:19 +00:00
|
|
|
|
if [ ! "${INSTALL}" = Yes ]; then
|
2003-04-14 09:23:40 +00:00
|
|
|
|
if [ -r ${HOME}/.fluxbox/menuconfig ]; then
|
|
|
|
|
. ${HOME}/.fluxbox/menuconfig
|
|
|
|
|
else
|
|
|
|
|
if [ ! "$WHOAMI" = root ]; then # this is only for users.
|
|
|
|
|
if touch ${HOME}/.fluxbox/menuconfig; then
|
2003-08-07 10:35:19 +00:00
|
|
|
|
cat << EOF > ${HOME}/.fluxbox/menuconfig
|
2002-12-29 10:37:47 +00:00
|
|
|
|
# This file is read by fluxbox-generate_menu. If you don't like a
|
|
|
|
|
# default you can change it here. Don't forget to remove the # in front
|
|
|
|
|
# of the line.
|
|
|
|
|
|
|
|
|
|
# Your favourite terminal
|
|
|
|
|
# MY_TERM=aterm
|
|
|
|
|
|
|
|
|
|
# Your favourite browser
|
|
|
|
|
# MY_BROWSER=mozilla
|
|
|
|
|
|
|
|
|
|
# Name of the outputfile
|
2003-08-04 14:13:33 +00:00
|
|
|
|
# MENUFILENAME=${HOME}/.fluxbox/menu
|
2002-12-29 10:37:47 +00:00
|
|
|
|
|
2003-06-10 12:14:35 +00:00
|
|
|
|
# MENUTITLE=\`fluxbox -version|cut -d " " -f-2\`
|
|
|
|
|
|
|
|
|
|
# standard url for console-browsers
|
|
|
|
|
# HOMEPAGE=fluxbox.org
|
|
|
|
|
|
|
|
|
|
# location with your own menu-entries
|
|
|
|
|
# USERMENU=~/.fluxbox/usermenu
|
|
|
|
|
|
2002-12-29 10:37:47 +00:00
|
|
|
|
|
2003-08-02 14:26:45 +00:00
|
|
|
|
# --- PREFIX'es
|
|
|
|
|
# These are prefixes; So if fluxbox is installed in /usr/bin/fluxbox
|
|
|
|
|
# your prefix is: /usr
|
|
|
|
|
# fluxbox-generate already looks in /usr, /usr/local and /opt so there should be no need
|
|
|
|
|
# to specify them.
|
|
|
|
|
#
|
|
|
|
|
# PREFIX=/usr
|
|
|
|
|
# GNOME_PREFIX=/opt/gnome
|
|
|
|
|
# KDE_PREFIX=/opt/kde
|
2002-12-29 10:37:47 +00:00
|
|
|
|
|
|
|
|
|
|
2003-06-06 02:18:34 +00:00
|
|
|
|
# Sepparate the list of background-dirs with semicolumns ':'
|
|
|
|
|
# BACKGROUND_DIRS="${HOME}/.fluxbox/backgrounds/:/usr/local/share/fluxbox/backgrounds/:/usr/share/wallpapers"
|
|
|
|
|
|
2003-08-02 14:26:45 +00:00
|
|
|
|
|
2003-06-06 02:18:34 +00:00
|
|
|
|
# --- Boolean variables.
|
2003-06-10 12:14:35 +00:00
|
|
|
|
# Setting a variable to ``no'' won't help. Comment them out if you don't
|
|
|
|
|
# want them. Setting are overruled by the command-line options.
|
2002-12-29 10:37:47 +00:00
|
|
|
|
|
|
|
|
|
# Include all backgrounds in your backgrounds-directory
|
|
|
|
|
# BACKGROUNDMENUITEM=yes
|
|
|
|
|
|
|
|
|
|
# Include kde-menus
|
|
|
|
|
# KDEMENU=yes
|
|
|
|
|
|
|
|
|
|
# Include gnome-menus
|
|
|
|
|
# GNOMEMENU=yes
|
|
|
|
|
|
|
|
|
|
# Don't cleanup the menu
|
|
|
|
|
# REMOVE=no
|
|
|
|
|
|
|
|
|
|
EOF
|
2003-04-14 09:23:40 +00:00
|
|
|
|
else
|
|
|
|
|
echo "Warning: I could't create ${HOME}/.fluxbox/menuconfig" >&2
|
|
|
|
|
fi
|
|
|
|
|
fi
|
2002-12-29 10:37:47 +00:00
|
|
|
|
fi
|
|
|
|
|
fi
|
2002-09-07 18:57:35 +00:00
|
|
|
|
# Get options.
|
2003-04-23 13:57:26 +00:00
|
|
|
|
while getopts ":Bkhragb:t:p:w:u:n:q:o:m:-:" COMMAND_LINE_ARGUMENT ; do
|
2002-11-19 06:21:45 +00:00
|
|
|
|
case "${COMMAND_LINE_ARGUMENT}" in
|
2002-12-20 09:02:02 +00:00
|
|
|
|
B) BACKGROUNDMENUITEM=yes ;;
|
|
|
|
|
k) KDEMENU=yes ;;
|
|
|
|
|
g) GNOMEMENU=yes ;;
|
|
|
|
|
t) MY_TERM=${OPTARG} ;;
|
|
|
|
|
b) MY_BROWSER=${OPTARG} ;;
|
2003-08-04 14:13:33 +00:00
|
|
|
|
o) MENUFILENAME=${OPTARG} ;;
|
2003-08-02 14:26:45 +00:00
|
|
|
|
p) PREFIX=${OPTARG} ;;
|
|
|
|
|
n) GNOME_PREFIX=${OPTARG} ;;
|
|
|
|
|
q) KDE_PREFIX=${OPTARG} ;;
|
2002-12-20 09:02:02 +00:00
|
|
|
|
m) MENUTITLE=${OPTARG} ;;
|
|
|
|
|
w) HOMEPAGE=${OPTARG} ;;
|
|
|
|
|
u) USERMENU=${OPTARG} ;;
|
|
|
|
|
r) REMOVE=no ;;
|
|
|
|
|
h) display_help ; exit 0 ;;
|
|
|
|
|
a) display_authors ; exit 0 ;;
|
2003-04-23 13:57:26 +00:00
|
|
|
|
-) echo "fluxbox-generate_menu doesn't recognize -- gnu-longopts."
|
|
|
|
|
echo 'Use fluxbox-generate_menu -h for a long help message.'
|
|
|
|
|
display_usage
|
|
|
|
|
exit 1 ;;
|
|
|
|
|
*) echo 'Use fluxbox-generate_menu -h for a long help message.'
|
|
|
|
|
display_usage
|
|
|
|
|
exit 1 ;;
|
2002-11-19 06:21:45 +00:00
|
|
|
|
esac
|
2002-09-07 18:57:35 +00:00
|
|
|
|
done
|
2002-12-20 09:02:02 +00:00
|
|
|
|
# Check defaults
|
2002-09-07 18:57:35 +00:00
|
|
|
|
|
2003-08-04 14:13:33 +00:00
|
|
|
|
# Can we actually create ${MENUFILENAME}
|
2003-08-07 10:35:19 +00:00
|
|
|
|
touch ${MENUFILENAME} 2> /dev/null
|
2003-04-14 09:23:40 +00:00
|
|
|
|
if [ $? -ne 0 ]; then
|
2003-08-04 14:13:33 +00:00
|
|
|
|
echo "Fatal error: can't create or write to $MENUFILENAME" >&2
|
2002-10-22 09:26:45 +00:00
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
2002-10-24 09:33:42 +00:00
|
|
|
|
# backup menu
|
2003-08-04 14:13:33 +00:00
|
|
|
|
if [ -w "${MENUFILENAME}" ]; then
|
|
|
|
|
if [ -f ${MENUFILENAME}.firstbak ]; then
|
|
|
|
|
cp ${MENUFILENAME} ${MENUFILENAME}.firstbak
|
2002-11-12 19:19:14 +00:00
|
|
|
|
fi
|
2003-08-04 14:13:33 +00:00
|
|
|
|
mv ${MENUFILENAME} ${MENUFILENAME}.bak
|
2002-09-07 18:57:35 +00:00
|
|
|
|
fi
|
|
|
|
|
|
2003-08-02 14:26:45 +00:00
|
|
|
|
# prefix
|
2003-05-22 10:05:37 +00:00
|
|
|
|
PREFIX="${PREFIX:=@PREFIX@}"
|
2003-08-02 14:26:45 +00:00
|
|
|
|
if [ ! -d "${PREFIX}" -o -z "${PREFIX}" ]; then
|
|
|
|
|
PREFIX=/usr/local
|
2002-09-07 18:57:35 +00:00
|
|
|
|
fi
|
|
|
|
|
|
2003-08-02 14:26:45 +00:00
|
|
|
|
# gnome prefix
|
|
|
|
|
for GNOME_PREFIX in "${GNOME_PREFIX}" /usr /opt /usr/local "${PREFIX}"; do
|
|
|
|
|
if [ -n "${GNOME_PREFIX}" -a -d "$GNOME_PREFIX/share/gnome" ]; then
|
|
|
|
|
break;
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
# Will remain $PREFIX if all else fails
|
2002-10-24 09:33:42 +00:00
|
|
|
|
|
2003-08-02 14:26:45 +00:00
|
|
|
|
# kde prefix
|
|
|
|
|
for KDE_PREFIX in "${KDE_PREFIX}" /usr /opt /usr/local "${PREFIX}"; do
|
|
|
|
|
if [ -n "${KDE_PREFIX}" -a -d "$KDE_PREFIX/share/applnk" ]; then
|
|
|
|
|
break;
|
|
|
|
|
fi
|
|
|
|
|
done
|
2002-10-24 09:33:42 +00:00
|
|
|
|
|
2003-06-06 02:18:34 +00:00
|
|
|
|
# directory for the backgrounds
|
|
|
|
|
if [ -z "$BACKGROUND_DIRS" ]; then
|
2003-08-02 14:26:45 +00:00
|
|
|
|
BACKGROUND_DIRS="${HOME}/.fluxbox/backgrounds/:${PREFIX}/share/fluxbox/backgrounds/"
|
2003-06-06 02:18:34 +00:00
|
|
|
|
fi
|
2002-09-07 18:57:35 +00:00
|
|
|
|
|
2002-10-19 14:34:08 +00:00
|
|
|
|
# find the default terminal
|
2003-08-07 10:35:19 +00:00
|
|
|
|
|
|
|
|
|
if find_it $MY_TERM; then
|
|
|
|
|
DEFAULT_TERM=$MY_TERM
|
|
|
|
|
else
|
|
|
|
|
[ -n "$MY_TERM" ] && echo "Warning: you chose an invalid term." >&2
|
2002-10-19 14:34:08 +00:00
|
|
|
|
#The precise order is up for debate.
|
|
|
|
|
for term in Eterm aterm rxvt wterm xterm konsole gnome-terminal; do
|
2002-11-19 06:21:45 +00:00
|
|
|
|
if find_it $term; then
|
|
|
|
|
DEFAULT_TERM=$term
|
|
|
|
|
break
|
|
|
|
|
fi
|
2002-10-19 14:34:08 +00:00
|
|
|
|
done
|
2002-10-19 08:53:40 +00:00
|
|
|
|
fi
|
|
|
|
|
|
2002-10-19 14:34:08 +00:00
|
|
|
|
|
2002-11-12 19:19:14 +00:00
|
|
|
|
# find the default browser
|
2003-08-07 10:35:19 +00:00
|
|
|
|
if find_it $MY_BROWSER; then
|
|
|
|
|
DEFAULT_BROWSER=$MY_BROWSER
|
|
|
|
|
else
|
|
|
|
|
[ -n "$MY_BROWSER" ] && echo "Warning: you chose an invalid browser." >&2
|
2002-11-12 19:19:14 +00:00
|
|
|
|
#The precise order is up for debate.
|
2003-08-07 10:35:19 +00:00
|
|
|
|
for browser in mozilla-firebird MozillaFirebird opera skipstone mozilla galeon konqueror dillo netscape w3m links lynx; do
|
2002-11-19 06:21:45 +00:00
|
|
|
|
if find_it $browser; then
|
|
|
|
|
DEFAULT_BROWSER=$browser
|
|
|
|
|
break
|
|
|
|
|
fi
|
2002-11-12 19:19:14 +00:00
|
|
|
|
done
|
|
|
|
|
fi
|
|
|
|
|
|
2002-10-19 14:34:08 +00:00
|
|
|
|
|
|
|
|
|
# a unix system without any terms. that's odd
|
2003-04-14 09:23:40 +00:00
|
|
|
|
if [ -z "$DEFAULT_TERM" ]; then
|
2003-08-07 10:35:19 +00:00
|
|
|
|
cat << EOF >&2
|
2002-12-14 08:27:54 +00:00
|
|
|
|
Warning: I can't find any terminal-emulators in your PATH.
|
|
|
|
|
Please fix your PATH or specify your favourite terminal with the -t option
|
2002-10-19 14:34:08 +00:00
|
|
|
|
EOF
|
|
|
|
|
fi
|
|
|
|
|
|
2002-09-07 18:57:35 +00:00
|
|
|
|
|
|
|
|
|
# Start of menu
|
2003-08-04 14:13:33 +00:00
|
|
|
|
cat << EOF > ${MENUFILENAME}
|
2003-04-14 09:23:40 +00:00
|
|
|
|
# Generated by fluxbox-generate_menu
|
2002-12-17 16:42:20 +00:00
|
|
|
|
#
|
2003-04-14 09:23:40 +00:00
|
|
|
|
# If you read this it means you want to edit this file manually, so here
|
|
|
|
|
# are some useful tips:
|
2002-12-20 09:02:02 +00:00
|
|
|
|
#
|
2003-02-22 18:03:15 +00:00
|
|
|
|
# - You can add your own menu-entries to ~/.fluxbox/usermenu
|
2002-12-20 09:02:02 +00:00
|
|
|
|
#
|
|
|
|
|
# - If you miss apps please let me know and I will add them for the next
|
|
|
|
|
# release.
|
2002-12-17 16:42:20 +00:00
|
|
|
|
#
|
2003-07-03 13:05:38 +00:00
|
|
|
|
# - The -r option prevents removing of empty menu entries and lines which
|
2003-02-22 18:03:15 +00:00
|
|
|
|
# makes things much more readable.
|
2002-12-17 16:42:20 +00:00
|
|
|
|
#
|
|
|
|
|
# - To prevent any other app from overwriting your menu
|
|
|
|
|
# you can change the menu name in .fluxbox/init to:
|
2002-12-20 09:02:02 +00:00
|
|
|
|
# session.menuFile: /home/you/.fluxbox/my-menu
|
2002-12-17 16:42:20 +00:00
|
|
|
|
|
|
|
|
|
EOF
|
2002-09-07 18:57:35 +00:00
|
|
|
|
|
2003-08-04 14:13:33 +00:00
|
|
|
|
echo "[begin] (${MENUTITLE})" >> ${MENUFILENAME}
|
2002-09-07 18:57:35 +00:00
|
|
|
|
|
2002-11-04 11:38:51 +00:00
|
|
|
|
|
2002-11-19 06:21:45 +00:00
|
|
|
|
append "[exec] (${DEFAULT_TERM}) {${DEFAULT_TERM}}"
|
2002-09-07 18:57:35 +00:00
|
|
|
|
|
2002-11-12 19:19:14 +00:00
|
|
|
|
case "$DEFAULT_BROWSER" in
|
2002-11-19 06:21:45 +00:00
|
|
|
|
links|w3m|lynx) append "[exec] (${DEFAULT_BROWSER}) {${DEFAULT_TERM} -e ${DEFAULT_BROWSER} ${HOMEPAGE}}" ;;
|
2003-05-22 10:05:37 +00:00
|
|
|
|
firebird|mozilla|phoenix|galeon|dillo|netscape) append "[exec] (${DEFAULT_BROWSER}) {${DEFAULT_BROWSER}}" ;;
|
2002-11-12 19:19:14 +00:00
|
|
|
|
konqueror) append "[exec] (konqueror) {kfmclient openProfile webbrowsing}" ;;
|
|
|
|
|
opera) append "[exec] (opera) {env QT_XFT=true opera}" ;;
|
2003-05-22 10:05:37 +00:00
|
|
|
|
MozillaFirebird) append "[exec] (firebird) {MozillaFirebird}" ;;
|
|
|
|
|
*) append "[exec] (`basename $DEFAULT_BROWSER`) {$DEFAULT_BROWSER}" ;;
|
2002-11-12 19:19:14 +00:00
|
|
|
|
esac
|
2002-09-07 18:57:35 +00:00
|
|
|
|
|
2002-11-19 06:21:45 +00:00
|
|
|
|
find_it fbrun append "[exec] (Run) {fbrun}"
|
2002-09-07 18:57:35 +00:00
|
|
|
|
|
2002-11-04 11:38:51 +00:00
|
|
|
|
|
2002-12-20 09:02:02 +00:00
|
|
|
|
append_submenu "${TERMINALMENU}"
|
2002-11-12 19:19:14 +00:00
|
|
|
|
normal_find xterm gnome-terminal Eterm konsole aterm rxvt
|
2002-09-07 18:57:35 +00:00
|
|
|
|
append_menu_end
|
|
|
|
|
|
|
|
|
|
|
2002-12-20 09:02:02 +00:00
|
|
|
|
append_submenu "${NETMENU}"
|
|
|
|
|
append_submenu "${BROWSERMENU}"
|
2003-08-17 13:30:35 +00:00
|
|
|
|
normal_find mozilla-firebird netscape galeon mozilla dillo
|
2002-11-19 06:21:45 +00:00
|
|
|
|
find_it opera append "[exec] (opera) {env QT_XFT=true opera}"
|
|
|
|
|
find_it konqueror append "[exec] (konqueror) {kfmclient openProfile webbrowsing}"
|
|
|
|
|
find_it links append "[exec] (links) {${DEFAULT_TERM} -e links ${HOMEPAGE}}"
|
|
|
|
|
find_it w3m append "[exec] (w3m) {${DEFAULT_TERM} -e w3m ${HOMEPAGE}}"
|
|
|
|
|
find_it lynx append "[exec] (lynx) {${DEFAULT_TERM} -e lynx ${HOMEPAGE}}"
|
2002-11-12 19:19:14 +00:00
|
|
|
|
append_menu_end
|
2002-11-17 15:56:37 +00:00
|
|
|
|
|
2002-11-12 19:19:14 +00:00
|
|
|
|
append_submenu IM
|
2002-11-17 15:56:37 +00:00
|
|
|
|
normal_find gaim kopete gnomemeeting
|
2002-11-19 06:21:45 +00:00
|
|
|
|
find_it licq append "[exec] (licq) {env QT_XFT=true licq}"
|
2002-11-12 19:19:14 +00:00
|
|
|
|
append_menu_end
|
|
|
|
|
|
|
|
|
|
append_submenu Mail
|
2002-11-17 15:56:37 +00:00
|
|
|
|
normal_find sylpheed kmail evolution
|
2002-11-19 06:21:45 +00:00
|
|
|
|
find_it mutt append "[exec] (mutt) {${DEFAULT_TERM} -e mutt}"
|
2002-11-12 19:19:14 +00:00
|
|
|
|
append_menu_end
|
|
|
|
|
|
|
|
|
|
append_submenu IRC
|
2003-04-08 09:39:37 +00:00
|
|
|
|
normal_find xchat ksirc
|
2002-11-19 06:21:45 +00:00
|
|
|
|
find_it irssi append "[exec] (irssi) {${DEFAULT_TERM} -e irssi}"
|
2002-12-29 10:37:47 +00:00
|
|
|
|
find_it BitchX append "[exec] (BitchX) {${DEFAULT_TERM} -e BitchX -N}" || \
|
|
|
|
|
find_it bitchx append "[exec] (BitchX) {${DEFAULT_TERM} -e bitchx -N}"
|
2002-11-19 06:21:45 +00:00
|
|
|
|
find_it ircii append "[exec] (ircii) {${DEFAULT_TERM} -e ircii -s}"
|
2002-11-12 19:19:14 +00:00
|
|
|
|
append_menu_end
|
|
|
|
|
|
2003-04-08 09:39:37 +00:00
|
|
|
|
append_submenu P2P
|
|
|
|
|
normal_find gtk-gnutella lopster
|
|
|
|
|
append_menu_end
|
|
|
|
|
|
2002-11-12 19:19:14 +00:00
|
|
|
|
normal_find gftp pan
|
2003-04-08 09:39:37 +00:00
|
|
|
|
|
2002-09-07 18:57:35 +00:00
|
|
|
|
append_menu_end
|
|
|
|
|
|
|
|
|
|
|
2002-12-20 09:02:02 +00:00
|
|
|
|
append_submenu "${EDITORMENU}"
|
2002-11-12 19:19:14 +00:00
|
|
|
|
normal_find nedit gvim xemacs emacs gedit xedit kword kwrite kate
|
2002-09-07 18:57:35 +00:00
|
|
|
|
append_menu_end
|
|
|
|
|
|
2003-02-22 18:03:15 +00:00
|
|
|
|
append_submenu "${FILEUTILSMENU}"
|
|
|
|
|
normal_find konqueror
|
|
|
|
|
find_it nautilus append "[exec] (nautilus) {nautilus --no-desktop}"
|
|
|
|
|
find_it mc append "[exec] (mc) {${DEFAULT_TERM} -e mc}"
|
|
|
|
|
append_menu_end
|
2002-11-04 11:38:51 +00:00
|
|
|
|
|
2002-12-20 09:02:02 +00:00
|
|
|
|
append_submenu "${MULTIMEDIAMENU}"
|
|
|
|
|
append_submenu "${GRAPHICMENU}"
|
2003-06-22 12:50:03 +00:00
|
|
|
|
normal_find gimp xv gqview xpaint kpaint kiconedit xscreensaver-demo blender
|
2002-11-19 06:21:45 +00:00
|
|
|
|
find_it gears append "[exec] (Mesa gears) {gears}"
|
|
|
|
|
find_it morph3d append "[exec] (Mesa morph) {morph3d}"
|
|
|
|
|
find_it reflect append "[exec] (Mesa reflect) {reflect}"
|
2002-11-04 11:38:51 +00:00
|
|
|
|
append_menu_end
|
|
|
|
|
|
2002-12-20 09:02:02 +00:00
|
|
|
|
append_submenu "${MUSICMENU}"
|
2003-07-29 09:29:45 +00:00
|
|
|
|
normal_find xmms noatun alsaplayer gqmpeg aumix xmixer gmix kmix kscd \
|
|
|
|
|
grecord kmidi xplaycd soundtracker grip easytag audacity \
|
|
|
|
|
zinf rhythmbox
|
2002-12-29 10:37:47 +00:00
|
|
|
|
find_it cdcd append "[exec] (cdcd) {${DEFAULT_TERM} -e cdcd}"
|
2002-11-04 11:38:51 +00:00
|
|
|
|
find_it cplay append "[exec] (cplay) {${DEFAULT_TERM} -e cplay}"
|
2002-12-29 10:37:47 +00:00
|
|
|
|
find_it alsamixer append "[exec] (AlsaMixer) {${DEFAULT_TERM} -e alsamixer}"
|
2002-11-04 11:38:51 +00:00
|
|
|
|
append_menu_end
|
|
|
|
|
|
|
|
|
|
|
2003-05-12 19:55:07 +00:00
|
|
|
|
append_submenu "${VIDEOMENU}"
|
|
|
|
|
normal_find xine aviplay gtv gmplayer xmovie xcdroast xgdb ddd realplay xawtv
|
2002-11-19 06:21:45 +00:00
|
|
|
|
find_it dvdrip append "[exec] (dvdrip) {nohup dvdrip}"
|
2002-11-04 11:38:51 +00:00
|
|
|
|
append_menu_end
|
|
|
|
|
|
2002-12-20 09:02:02 +00:00
|
|
|
|
append_submenu "${XUTILSMENU}"
|
2003-06-06 02:18:34 +00:00
|
|
|
|
normal_find xfontsel xman xload xfigxbiff editres viewres xclock xmag wmagnify gkrellm
|
2002-11-04 11:38:51 +00:00
|
|
|
|
append_menu_end
|
2002-09-07 18:57:35 +00:00
|
|
|
|
append_menu_end
|
|
|
|
|
|
|
|
|
|
|
2002-12-20 09:02:02 +00:00
|
|
|
|
append_submenu "${OFFICEMENU}"
|
2002-11-17 15:56:37 +00:00
|
|
|
|
normal_find xclock xcalc kcalc
|
2002-12-29 10:37:47 +00:00
|
|
|
|
find_it gcalc append "[exec] (gcalc) {gcalc}" || \
|
2002-11-19 06:21:45 +00:00
|
|
|
|
find_it gnome-calculator append "[exec] (gcalc) {gnome-calculator}"
|
2002-11-04 11:38:51 +00:00
|
|
|
|
find_it ooffice append "[exec] (Open Office) {ooffice}"
|
2003-04-23 13:57:26 +00:00
|
|
|
|
find_it oocalc append "[exec] (OO Calc) {oocalc}"
|
|
|
|
|
find_it oowriter append "[exec] (OO Writer) {oowriter}"
|
|
|
|
|
find_it ooimpress append "[exec] (OO Impress) {ooimpress}"
|
|
|
|
|
find_it oodraw append "[exec] (OO Draw) {oodraw}"
|
|
|
|
|
find_it oomath append "[exec] (OO Math) {oomath}"
|
|
|
|
|
find_it oopadmin append "[exec] (OO Printer Administration) {oopadmin}"
|
|
|
|
|
find_it mrproject append "[exec] (Mr.Project) {mrproject}"
|
2002-11-04 11:38:51 +00:00
|
|
|
|
find_it soffice append "[exec] (Star Office) {soffice}"
|
2003-04-23 13:57:26 +00:00
|
|
|
|
|
2002-11-04 11:38:51 +00:00
|
|
|
|
normal_find abiword kword wordperfect katoob acroread xpdf
|
2002-09-07 18:57:35 +00:00
|
|
|
|
append_menu_end
|
|
|
|
|
|
2002-12-20 09:02:02 +00:00
|
|
|
|
append_submenu "${GAMESMENU}"
|
2002-11-12 19:19:14 +00:00
|
|
|
|
normal_find bzflag gnibbles gnobots2 tuxpuck gataxx glines \
|
|
|
|
|
gnect mahjongg gnomine gnome-stones gnometris gnotravex \
|
2003-01-04 15:22:29 +00:00
|
|
|
|
gnotski iagno knights eboard xboard freecell pysol \
|
2002-11-19 06:21:45 +00:00
|
|
|
|
gtali tuxracer xpenguins xsnow xeyes xpenguins \
|
2003-08-04 14:13:33 +00:00
|
|
|
|
quake2 quake3 skoosh same-gnome enigma xbill icebreaker
|
2003-06-22 12:50:03 +00:00
|
|
|
|
find_it et append "[exec] (Enemy Territory) {et}"
|
2002-11-12 19:19:14 +00:00
|
|
|
|
append_menu_end
|
2002-11-04 11:38:51 +00:00
|
|
|
|
|
2003-08-02 14:26:45 +00:00
|
|
|
|
# We'll only use this once
|
|
|
|
|
ETCAPPLNK=/etc/X11/applnk
|
2002-09-07 18:57:35 +00:00
|
|
|
|
# gnome menu
|
2003-08-03 04:12:03 +00:00
|
|
|
|
if [ "${GNOMEMENU}" ]; then
|
2002-12-20 09:02:02 +00:00
|
|
|
|
append_submenu "${GNOMEMENUTEXT}"
|
2003-08-02 14:42:43 +00:00
|
|
|
|
recurse_dir_menu "${GNOME_PREFIX}/share/gnome/apps" "$HOME/.gnome/apps" ${ETCAPPLNK}
|
2002-10-19 14:34:08 +00:00
|
|
|
|
append_menu_end
|
2003-08-02 14:42:43 +00:00
|
|
|
|
unset ETCAPPLNK
|
2002-09-07 18:57:35 +00:00
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# kde submenu
|
2003-08-03 04:12:03 +00:00
|
|
|
|
if [ -d "${KDE_PREFIX}/share/applnk/" -a "${KDEMENU}" ]; then
|
2002-12-20 09:02:02 +00:00
|
|
|
|
append_submenu "${KDEMENUTEXT}"
|
2003-08-02 14:42:43 +00:00
|
|
|
|
recurse_dir_menu "${KDE_PREFIX}/share/applnk" "$HOME/.kde/share/applnk" ${ETCAPPLNK}
|
2002-10-19 14:34:08 +00:00
|
|
|
|
append_menu_end
|
2003-08-02 14:42:43 +00:00
|
|
|
|
unset ETCAPPLNK
|
2002-09-07 18:57:35 +00:00
|
|
|
|
fi
|
|
|
|
|
|
2002-12-20 09:02:02 +00:00
|
|
|
|
#User menu
|
2003-04-14 09:23:40 +00:00
|
|
|
|
if [ -r "${USERMENU}" ]; then
|
2003-08-04 14:13:33 +00:00
|
|
|
|
cat ${USERMENU} >> ${MENUFILENAME}
|
2002-12-20 09:02:02 +00:00
|
|
|
|
fi
|
2002-11-12 19:19:14 +00:00
|
|
|
|
|
2002-12-20 09:02:02 +00:00
|
|
|
|
append_submenu "${FBSETTINGSMENU}"
|
|
|
|
|
append "[config] (${CONFIGUREMENU})"
|
2002-12-16 11:10:44 +00:00
|
|
|
|
|
2002-12-20 09:02:02 +00:00
|
|
|
|
append_menu "[submenu] (${SYSTEMSTYLES}) {${STYLEMENUTITLE}}"
|
2003-08-02 14:26:45 +00:00
|
|
|
|
append "[stylesdir] (${PREFIX}/share/fluxbox/styles)"
|
2002-12-20 09:02:02 +00:00
|
|
|
|
append_menu_end
|
2002-09-07 18:57:35 +00:00
|
|
|
|
|
2002-12-20 09:02:02 +00:00
|
|
|
|
append_menu "[submenu] (${USERSTYLES}) {${STYLEMENUTITLE}}"
|
|
|
|
|
append "[stylesdir] (~/.fluxbox/styles)"
|
|
|
|
|
append_menu_end
|
2002-12-14 23:58:13 +00:00
|
|
|
|
|
2003-01-23 07:08:24 +00:00
|
|
|
|
# Backgroundmenu
|
2003-05-22 13:10:59 +00:00
|
|
|
|
addbackground() {
|
|
|
|
|
picturename=`basename "$1"`
|
|
|
|
|
append "[exec] (${picturename%.???}) {fbsetbg -f \"$1\" }"
|
|
|
|
|
}
|
2003-06-06 02:18:34 +00:00
|
|
|
|
|
2003-08-07 10:35:19 +00:00
|
|
|
|
if [ "$BACKGROUNDMENUITEM" = yes ]; then
|
2003-06-06 02:18:34 +00:00
|
|
|
|
IFS=: # set delimetor for find
|
2003-08-07 10:35:19 +00:00
|
|
|
|
NUMBER_OF_BACKGROUNDS=`find $BACKGROUND_DIRS -follow -type f 2> /dev/null|wc -l`
|
2003-06-06 02:18:34 +00:00
|
|
|
|
if [ "$NUMBER_OF_BACKGROUNDS" -gt 0 ]; then
|
|
|
|
|
append_menu "[submenu] (${BACKGROUNDMENU}) {${BACKGROUNDMENUTITLE}}"
|
|
|
|
|
if [ "$NUMBER_OF_BACKGROUNDS" -gt 30 ]; then
|
|
|
|
|
menucounter=1 ; counter=1
|
|
|
|
|
append_menu "[submenu] (${BACKGROUNDMENU} $menucounter) {${BACKGROUNDMENUTITLE}}"
|
|
|
|
|
find $BACKGROUND_DIRS -follow -type f|sort|while read i; do
|
|
|
|
|
counter=`expr $counter + 1`
|
|
|
|
|
if [ $counter -eq 30 ]; then
|
|
|
|
|
counter=1
|
|
|
|
|
menucounter=`expr $menucounter + 1`
|
|
|
|
|
append_menu_end
|
|
|
|
|
append_menu "[submenu] (${BACKGROUNDMENU} $menucounter) {${BACKGROUNDMENUTITLE}}"
|
|
|
|
|
fi
|
|
|
|
|
addbackground "$i"
|
|
|
|
|
done
|
|
|
|
|
append_menu_end
|
|
|
|
|
else
|
|
|
|
|
find $BACKGROUND_DIRS -follow -type f|sort|while read i; do
|
|
|
|
|
addbackground "$i"
|
|
|
|
|
done
|
|
|
|
|
fi
|
2003-01-23 07:08:24 +00:00
|
|
|
|
append_menu_end
|
|
|
|
|
else
|
2003-06-06 02:18:34 +00:00
|
|
|
|
echo "Warning: You wanted a background-menu but I couldn't find any backgrounds in:
|
2003-06-10 12:14:35 +00:00
|
|
|
|
$BACKGROUND_DIRS" >&2
|
2002-12-20 09:02:02 +00:00
|
|
|
|
fi
|
2003-01-23 07:08:24 +00:00
|
|
|
|
fi
|
2002-09-21 13:32:26 +00:00
|
|
|
|
|
2003-01-23 07:08:24 +00:00
|
|
|
|
append "[workspaces] (${WORKSPACEMENU})"
|
|
|
|
|
|
|
|
|
|
append_submenu Tools
|
2003-02-22 18:03:15 +00:00
|
|
|
|
normal_find fluxconf fluxkeys fluxmenu
|
2003-01-23 07:08:24 +00:00
|
|
|
|
# if gxmessage exitst use it; else use xmessage
|
|
|
|
|
find_it gxmessage append \
|
2003-05-12 19:55:07 +00:00
|
|
|
|
"[exec] (Windowname) {xprop WM_CLASS|cut -d \\\" -f 2|gxmessage -file - -center}" || \
|
2003-01-23 07:08:24 +00:00
|
|
|
|
find_it xmessage append \
|
2003-05-12 19:55:07 +00:00
|
|
|
|
"[exec] (Windowname) {xprop WM_CLASS|cut -d \\\" -f 2|xmessage -file - -center}"
|
2003-01-23 07:08:24 +00:00
|
|
|
|
find_it import append "[exec] (screenshot) {import screenshot.png && qiv -W 50 screenshot.png}"
|
|
|
|
|
find_it fbrun append "[exec] (Run) {fbrun}"
|
2003-07-17 23:39:34 +00:00
|
|
|
|
find_it switch append "[exec] (gtk-theme-switch) {switch}"
|
|
|
|
|
find_it switch2 append "[exec] (gtk2-theme-switch) {switch2}"
|
2003-06-10 12:14:35 +00:00
|
|
|
|
find_it fluxbox-generate_menu append "[exec] (regenerate menu) {fluxbox-generate_menu}"
|
|
|
|
|
append_menu_end
|
|
|
|
|
|
|
|
|
|
append_submenu ${WINDOWMANAGERS}
|
2003-08-04 14:13:33 +00:00
|
|
|
|
#hard to properly maintain since there are so many exceptions to the rule.
|
2003-08-07 10:35:19 +00:00
|
|
|
|
for wm in icewm ion kde sawfish enlightenment openbox evilwm waimea xfce pekwm; do
|
2003-08-04 14:13:33 +00:00
|
|
|
|
find_it start${wm} append "[restart] (${wm}) {start${wm}}" ||\
|
|
|
|
|
find_it ${wm} append "[restart] (${wm}) {${wm}}"
|
|
|
|
|
done
|
2003-06-10 12:14:35 +00:00
|
|
|
|
find_it startgnome append "[restart] (gnome) {startgnome}" ||\
|
|
|
|
|
find_it gnome-session append "[restart] (gnome) {gnome-session}"
|
2003-08-04 14:13:33 +00:00
|
|
|
|
|
2003-06-10 12:14:35 +00:00
|
|
|
|
find_it startwindowmaker append "[restart] (windowmaker) {startwindowmaker}" ||\
|
|
|
|
|
find_it wmaker append "[restart] (windowmaker) {wmaker}"
|
2002-12-20 09:02:02 +00:00
|
|
|
|
append_menu_end
|
2002-09-07 18:57:35 +00:00
|
|
|
|
|
2003-01-23 07:08:24 +00:00
|
|
|
|
append "[reconfig] (${RELOADITEM})"
|
|
|
|
|
append "[restart] (${RESTARTITEM})"
|
|
|
|
|
append "[exit] (${EXITITEM})"
|
|
|
|
|
|
|
|
|
|
append_menu_end
|
2002-09-07 18:57:35 +00:00
|
|
|
|
append_menu_end
|
2002-11-12 19:19:14 +00:00
|
|
|
|
|
|
|
|
|
# this function removes empty menu items. It can not yet remove nested
|
|
|
|
|
# empty submenus :\
|
|
|
|
|
|
2003-04-14 09:23:40 +00:00
|
|
|
|
if [ ! "${REMOVE}" ]; then
|
2002-11-12 19:19:14 +00:00
|
|
|
|
clean_up
|
|
|
|
|
fi
|
2002-12-14 08:27:54 +00:00
|
|
|
|
|
2003-02-22 18:03:15 +00:00
|
|
|
|
echo 'Menu succesfully generated.'
|
|
|
|
|
echo 'Use fluxbox-generate_menu -h to read all about the latest features.'
|