fluxbox/util/fluxbox-generate_menu.in
2005-07-06 06:26:09 +00:00

1759 lines
59 KiB
Bash
Executable file
Raw Blame History

#!/bin/sh
#
# generate_menu for Fluxbox
#
# Copyright (c) 2005 Dung N. Lam <dnlam@users.sourceforge.net>
# Copyright (c) 2002-2004 Han Boetes <han@mijncomputer.nl>
#
# 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,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# 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.
#
# $Id$
#
# Portability notes:
# To guarantee this script works on all platforms that support fluxbox
# please keep the following restrictions in mind:
#
# - don't use [ "a" == "a" ]; use [ "a" = "a" ] (found with help from FreeBSD user relaxed)
# - 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 or $UID, use whoami
# - getopts won't work on all platforms, but the config-file can
# compensate for that.
# - OpenBSD and Solaris grep do not have the -m option
# - 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.
# Non portable features like getopts in this script can be achieved in
# other ways.
WHOAMI=`whoami`
[ "$WHOAMI" = root ] && PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
# Check for Imlib2-support
if fluxbox -info 2> /dev/null | grep -q "^IMLIB"; then
PNG_ICONS="yes"
else
# better assume to assume "no"
PNG_ICONS="no"
fi
# Functions
display_usage() {
cat << EOF
Usage: fluxbox-generate_menu [-kgrBh] [-t terminal] [-w url] [-b browser]
[-m menu-title] [-o /path] [-u /path] [-p /path] [-n /path] [-q /path]
[-d /path ] [-ds] [-i /path] [-is]
EOF
}
display_help() {
display_usage
cat << EOF
Options:
-k Insert a kde menu
-g Add a gnome menu
-B enable backgrounds menu
-r Don't remove empty menu-entries; for templates
-d other path(s) to recursively search for *.desktop files
-ds wider search for *.desktop files (takes more time)
-i other path(s) to search for icons
e.g., "/usr/kde/3.3/share/icons/crystalsvg/16x16/*"
-is wider search for icons (worth the extra time)
-in skip icon search
-t Favourite terminal
-w Homepage for console-browsers. Default is fluxbox.org
-b Favourite browser
-m Menu-title; default is "Fluxbox"
-o Outputfile; default is ~/.fluxbox/menu
-u user sub-menu; default is ~/.fluxbox/usermenu
-h Display this help
-a Display the authors of this script
Only for packagers:
-p prefix; default is @PREFIX@
-n Gnome-prefix; /opt, /usr, /usr/X11R6 and /usr/local autodetected
-q KDE-prefix; idem dito
Files:
~/.fluxbox/usermenu your own submenu which will be included in the menu
~/.fluxbox/menuconfig rc file for fluxbox-generate_menu
EOF
}
display_authors() {
cat << EOF
fluxbox-generate_menu was brought to you by:
Henrik Kinnunen: Project leader.
Han Boetes: Packaging, debugging and scripts.
Simon Bowden: Cleanups and compatibility for sun.
Jeramy B. Smith: Packaging assistance, gnome and kde menu system.
Filippo Pappalardo: Italian locales and -t option.
$WHOAMI: Innocent bystander.
EOF
}
# some which's have a reliable return code, some don't
# Lets figure out which which we have.
if which this_program_does_not_exist-no_really-aA1zZ9 2> /dev/null 1> /dev/null; then
# can't rely on return value
find_it() {
file=`which $1 2> /dev/null`
if [ -x "$file" ]; then
if [ $# -gt 1 ]; then
shift
$*
fi
return 0
else
return 1
fi
}
find_it_options() {
file=`which $1 2> /dev/null`
if [ -x "$file" ]; then
return 0
else
return 1
fi
}
else
# can rely on return value
find_it() {
which $1 > /dev/null 2>&1 && shift && $*
}
find_it_options() {
which $1 > /dev/null 2>&1
}
fi
#echo "replaceWithinString: $1, $2, $3" >&2
#echo ${1//$2/$3} # causes error in BSD even though not used
replaceWithinString(){
echo $1 | awk "{ gsub(/$2/, \"$3\"); print }"
}
convertIcon(){
if [ ! -f "$1" ] ; then
echo "Icon file not found: $1" >&2
return 1
fi
if [ "$1" = "$2" ]; then
# $dnlamVERBOSE "Files are in the same location: $1 = $2" >&2
# not really an error; just nothing to do.
return 0;
fi
local BASENAME
BASENAME="${1##*/}"
# make sure it is an icon by checking if it has an extension
if [ "$BASENAME" = "${BASENAME%%.*}" ]; then
# $dnlamVERBOSE "File $1 does not have a filename extention." >&2
return 1;
fi
# don't have to convert xpm files
case "$1" in
*.xpm)
echo "$1"
return 0;
;;
esac
# may not have to convert png if imlib is enabled
if [ "$PNG_ICONS" = "yes" ]; then
case "$1" in
*.png)
echo "$1"
return 0;
;;
esac
fi
# convert all others icons and save it as xpm format under directory $2
entry_icon="$2/${BASENAME%.*}.xpm"
if [ -f "${entry_icon}" ]; then
: echo "File exists. To overwrite, type: convert \"$1\" \"$entry_icon\"" >&2
else
if which convert &> /dev/null; then
convert "$1" "$entry_icon"
# echo convert "$1" , "$entry_icon" >> $ICONMAPPING
else
echo "Please install ImageMagick's convert utility" >&2
fi
fi
echo "$entry_icon"
}
removePath(){
execname="$1"
local progname
progname="${execname%% *}"
# separate program name and its parameters
if [ "$progname" = "$execname" ]; then
# no params
# remove path from only program name
execname="${progname##*/}"
else
local params
params="${execname#* }"
# remove path from only program name
execname="${progname##*/} $params"
fi
echo $execname
}
doSearchLoop(){
for ICONPATH in "$@"; do
## $dnlamVERBOSE ": $ICONPATH" >> $ICONMAPPING
[ -d "$ICONPATH" ] || continue
#echo -n "."
# # $dnlamVERBOSE ":: $ICONPATH/$temp_icon" >> $ICONMAPPING
if [ -f "$ICONPATH/$temp_icon" ]; then
echo "$ICONPATH/$temp_icon"
return 0;
else # try different extensions;
# remove extension
iconNOext="${temp_icon%%.*}"
[ -d "$ICONPATH" ] && for ICONEXT in .xpm .png .gif ; do
## echo "::: $ICONPATH/$iconNOext$ICONEXT" >> $ICONMAPPING
if [ -f "$ICONPATH/$iconNOext$ICONEXT" ]; then
echo "$ICONPATH/$iconNOext$ICONEXT"
return 0;
fi
done
fi
done
#echo "done"
return 1
}
doSearch(){
# remove '(' from '(fluxbox ...) | ...'
local execname temp_icon
execname=`replaceWithinString "$1" "\("`
temp_icon="$2"
# $dnlamVERBOSE "# Searching for icon $temp_icon for $execname" >> $ICONMAPPING
# check in $ICONMAPPING before searching directories
entry_icon=`grep "^\"${execname}\"" $ICONMAPPING | head -n 1 | grep -o '<.*>'`
if [ -n "$entry_icon" ]; then
entry_icon=`replaceWithinString "$entry_icon" "<"`
entry_icon=`replaceWithinString "$entry_icon" ">"`
echo $entry_icon
return 0;
fi
# echo "$ICONMAPPING for $execname: $entry_icon"
# the following paths include a user-defined variable, listing paths to search for icons
# echo -n "for $temp_icon"
eval doSearchLoop $USER_ICONPATHS \
"$FB_ICONDIR" \
"/usr/share/${execname%% *}" \
${OTHER_ICONPATHS} \
}
searchForIcon(){
# remove '&' and everything after it
entry_exec="${1%%&*}"
entry_icon="$2"
# $dnlamVERBOSE echo "searchForIcon \"$entry_exec\" \"$entry_icon\"" >&2
# get the basename and parameters of entry_exec -- no path
entry_exec=`removePath "${entry_exec}"`
[ -z "$entry_exec" ] && { echo "Exec is NULL $1 with icon $2"; return 1; }
# search for specified icon if it does not exists
if [ -n "$entry_icon" ] && [ ! "$entry_exec" = "$entry_icon" ] && [ ! -f "$entry_icon" ]; then
# to search for icon in other paths,
# get basename
local temp_icon
temp_icon="${entry_icon##*/}"
# remove parameters
temp_icon="${temp_icon#* }"
# clear entry_icon until temp_icon is found
unset entry_icon
if [ ! -f "$entry_icon" ]; then
entry_icon=`doSearch "$entry_exec" "$temp_icon"`
fi
fi
# remove parameters
local execname
execname="${entry_exec%% *}"
# echo "search for icon named $execname.{xpm,png,gif}"
if [ ! -f "$entry_icon" ]; then
entry_icon=`doSearch "$entry_exec" "$execname"`
fi
# ----------- done with search ------------
# $dnlamVERBOSE echo "::: $entry_icon" >&2
# convert icon file, if needed
if [ -f "$entry_icon" ] && [ -n "yes$ConvertIfNecessary" ]; then
entry_icon=`convertIcon "$entry_icon" "$HOME/.fluxbox/icons"`
# $dnlamVERBOSE echo ":::: $entry_icon" >&2
fi
# remove path to icon; just get basename
local icon_base
icon_base="${entry_icon##*/}"
# remove extension
icon_base="${icon_base%%.*}"
# echo "^.${entry_exec}.[[:space:]]*<.*/${icon_base}\....>"
if [ -f "$entry_icon" ]; then
# if icon exists and entry does not already exists, add it
if ! grep -q -m 1 "^.${entry_exec}.[[:space:]]*<.*/${icon_base}\....>" $ICONMAPPING 2> /dev/null; then
echo -e "\"${entry_exec}\" \t <${entry_icon}>" >> $ICONMAPPING
else
: echo "# mapping already exists for ${entry_exec}" >> $ICONMAPPING
fi
else
echo "# No icon file found for $entry_exec" >> $ICONMAPPING
fi
}
toSingleLine(){ echo "$@"; }
createIconMapping(){
# $dnlamVERBOSE "# creating `date`" >> $ICONMAPPING
# $dnlamVERBOSE "# using desktop files in $@" >> $ICONMAPPING
# $dnlamVERBOSE "# searching for icons in `eval toSingleLine $OTHER_ICONPATHS`" >> $ICONMAPPING
# need to determine when to use .fluxbox/icons/$execname.xpm over those listed in iconmapping
# $dnlamVERBOSE echo "createIconMapping: $@"
for DIR in "$@" ; do
if [ -d "$DIR" ]; then
# $dnlamVERBOSE echo "# ------- Looking in $DIR" >&2
# >> $ICONMAPPING
find "$DIR" -type f -name "*.desktop" | while read DESKTOP_FILE; do
# echo $DESKTOP_FILE;
#entry_name=`grep '^[ ]*Name=' $DESKTOP_FILE | head -n 1`
#entry_name=${entry_name##*=}
entry_exec=`grep '^[ ]*Exec=' "$DESKTOP_FILE" | head -n 1`
entry_exec=${entry_exec##*=}
entry_exec=`replaceWithinString "$entry_exec" "\""`
if [ -z "$entry_exec" ]; then
entry_exec=${DESKTOP_FILE%%.desktop*}
fi
entry_icon=`grep '^[ ]*Icon=' "$DESKTOP_FILE" | head -n 1`
entry_icon=${entry_icon##*=}
# $dnlamVERBOSE echo "--- $entry_exec $entry_icon" >&2
case "$entry_icon" in
"" | mime_empty | no_icon )
: echo "no icon for $entry_exec"
;;
*)
searchForIcon "$entry_exec" "$entry_icon"
;;
esac
done
fi
done
# $dnlamVERBOSE "# done `date`" >> $ICONMAPPING
}
lookupIcon() {
if [ ! -f "$ICONMAPPING" ]; then
echo "!!! Icon map file not found: $ICONMAPPING" >&2
return 1
fi
local execname
execname="$1"
shift
[ -n "$1" ] && echo "!! Ignoring extra paramters: $*" >&2
[ -z "$execname" ] && { echo "execname is NULL; cannot lookup"; return 1; }
execname=`removePath "$execname"`
#echo "grepping ${execname}"
iconString=`grep "^\"${execname}\"" $ICONMAPPING | head -n 1 | grep -o '<.*>'`
# $dnlamVERBOSE "lookupIcon $execname, $iconString" >&2
if [ -z "$iconString" ] ; then
iconString=`grep "^\"${execname%% *}" $ICONMAPPING | head -n 1 | grep -o '<.*>'`
fi
if [ -z "$iconString" ] && [ -z "$PARSING_DESKTOP" ] ; then
## $dnlamVERBOSE "lookupIcon: Searching ... should only be needed for icons not gotten from *.desktop (manual-created ones): $execname" >&2
searchForIcon "$execname" "$execname"
[ -n "$entry_icon" ] && iconString="<$entry_icon>"
fi
# [ -n "$iconString" ] && echo " Found icon for $execname: $iconString" >&2
echo $iconString
}
append() {
if [ -z "${INSTALL}" ]; then
# $dnlamVERBOSE echo "append: $*" >&2
local iconString
iconString="`echo $* | grep -o '<.*>'`"
# echo "iconString=$iconString" >&2
if [ -z "$iconString" ] && [ -z "$NO_ICON" ]; then
echo -n " $* " >> ${MENUFILENAME}
# get the program name between '{}' from parameters
local execname
execname="$*"
execname=${execname#*\{}
execname=${execname%%\}*}
# $dnlamVERBOSE echo "execname=$execname" >&2
# if execname hasn't changed from original $*, then no '{...}' was given
if [ ! "$execname" = "$*" ]; then
case "$execname" in
$DEFAULT_TERM*)
# remove quotes
execname=`replaceWithinString "$execname" "\""`
# remove "$DEFAULT_TERM -e "
# needed in case calling another program (e.g., vi) via "xterm -e"
execname=${execname##*$DEFAULT_TERM -e }
;;
esac
# lookup execname in icon map file
iconString=`lookupIcon "$execname"`
#[ -n "$iconString" ] || echo "No icon found for $execname"
fi
echo "${iconString}" >> ${MENUFILENAME}
else
echo " $*" >> ${MENUFILENAME}
fi
else
echo " $*" >> ${MENUFILENAME}
fi
}
append_menu() {
echo "$*" >> ${MENUFILENAME}
}
append_submenu() {
[ "${REMOVE}" ] && echo >> ${MENUFILENAME} # only an empty line in templates
append_menu "[submenu] ($1)"
}
append_menu_end() {
append_menu '[end]'
[ "${REMOVE}" ] && echo >> ${MENUFILENAME} # only an empty line in templates
}
menu_entry() {
if [ -f "$1" ]; then
# space&tab here
entry_name=`grep '^[ ]*Name=' "$1" | head -n 1 | cut -d = -f 2`
entry_exec=`grep '^[ ]*Exec=' "$1" | head -n 1 | cut -d = -f 2`
if [ -n "$entry_name" -a -n "$entry_exec" ]; then
append "[exec] ($entry_name) {$entry_exec}"
fi
fi
}
menu_entry_dir() {
for b in "$*"/*.desktop; do
menu_entry "${b}"
done
}
menu_entry_dircheck() {
if [ -d "$*" ]; then
menu_entry_dir "$*"
fi
}
# 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
}
normal_find() {
while [ "$1" ]; do
find_it $1 append "[exec] ($1) {$1}"
shift
done
}
cli_find() {
while [ "$1" ]; do
find_it $1 append "[exec] ($1) {${DEFAULT_TERM} -e $1}"
shift
done
}
clean_up() {
[ -f "$ICONMAPPING" ] && rm -f "$ICONMAPPING"
# Some magic to clean up empty menus
rm -f ${MENUFILENAME}.tmp
touch ${MENUFILENAME}.tmp
counter=10 # prevent looping in odd circumstances
until [ $counter -lt 1 ] || \
cmp ${MENUFILENAME} ${MENUFILENAME}.tmp 2>&1 > /dev/null; do
[ -s ${MENUFILENAME}.tmp ] && mv ${MENUFILENAME}.tmp ${MENUFILENAME}
counter=`expr $counter - 1`
grep -v '^$' ${MENUFILENAME}|sed -e "/^\[submenu].*/{
n
N
/^\[submenu].*\n\[end]/d
}"|sed -e "/^\[submenu].*/{
N
/^\[submenu].*\n\[end]/d
}" > ${MENUFILENAME}.tmp
done
rm -f ${MENUFILENAME}.tmp
}
# menu defaults (if translation forget to set one of them)
ABOUTITEM='About'
BACKGROUNDMENU='Backgrounds'
BACKGROUNDMENUTITLE='Set the Background'
BROWSERMENU='Browsers'
CONFIGUREMENU='Configure'
EDITORMENU='Editors'
EXITITEM='Exit'
FBSETTINGSMENU='fluxbox menu'
FILEUTILSMENU='File utils'
FLUXBOXCOMMAND='Fluxbox Command'
GAMESMENU='Games'
GNOMEMENUTEXT='Gnome-menus'
GRAPHICMENU='Graphics'
KDEMENUTEXT='KDE-menus'
LOCKSCREEN='Lock screen'
MISCMENU='Misc'
MULTIMEDIAMENU='Multimedia'
MUSICMENU='Audio'
NETMENU='Net'
NEWS='News'
OFFICEMENU='Office'
RANDOMBACKGROUND='Random Background'
REGENERATEMENU='Regen Menu'
RELOADITEM='Reload config'
RESTARTITEM='Restart'
RUNCOMMAND='Run'
SCREENSHOT='Screenshot'
STYLEMENUTITLE='Choose a style...'
SYSTEMSTYLES='System Styles'
TERMINALMENU='Terminals'
TOOLS='Tools'
USERSTYLES='User Styles'
VIDEOMENU='Video'
WINDOWMANAGERS='Window Managers'
WINDOWNAME='Window name'
WORKSPACEMENU='Workspace List'
XUTILSMENU='X-utils'
# Check translation
case ${LC_ALL} in
ru_RU*) #Russian locales
# Ah my Russian hero. Please help me update the translation
# $ cp fluxbox-generate-menu.in fluxbox-generate-menu.in.orig
# $ $EDITOR fluxbox-generate-menu.in
# $ diff u fluxbox-generate-menu.in.orig fluxbox-generate-menu.in > fbgm.diff
# email fbgm.diff to han@mijncomputer.nl
BACKGROUNDMENU='<27><><EFBFBD><EFBFBD>'
BACKGROUNDMENUTITLE='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>'
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>'
FILEUTILSMENU='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
FLUXBOXCOMMAND='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
GAMESMENU='<27><><EFBFBD><EFBFBD>'
GNOMEMENUTEXT='Gnome-<2D><><EFBFBD><EFBFBD>'
GRAPHICMENU='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
KDEMENUTEXT='KDE-<2D><><EFBFBD><EFBFBD>'
LOCKSCREEN='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>'
MISCMENU='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
MUSICMENU='<27><><EFBFBD><EFBFBD>'
NETMENU='<27><><EFBFBD><EFBFBD>'
OFFICEMENU='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
RANDOMBACKGROUND='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>'
REGENERATEMENU='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><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>'
RUNCOMMAND='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
SCREENSHOT='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
STYLEMENUTITLE='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>'
SYSTEMSTYLES='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>'
TERMINALMENU='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
TOOLS='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
USERSTYLES='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>'
WINDOWMANAGERS='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>'
WINDOWNAME='<27><><EFBFBD> <20><><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>'
;;
cs_CZ.ISO*) # Czech locales (ISO-8859-2 encodings)
ABOUTITEM='O programu...'
BACKGROUNDMENU='Pozad<61>'
BACKGROUNDMENUTITLE='Nastaven<65> pozad<61>'
BROWSERMENU='Prohl<68><6C>e<EFBFBD>e'
CONFIGUREMENU='Konfigurace'
EDITORMENU='Editory'
EXITITEM='Ukon<6F>it'
FBSETTINGSMENU='Fluxbox Menu'
FILEUTILSMENU='Souborov<6F> utility'
FLUXBOXCOMMAND='P<><50>kaz Fluxboxu'
GAMESMENU='Hry'
GNOMEMENUTEXT='Gnome-menu'
GRAPHICMENU='Grafika'
KDEMENUTEXT='KDE-menu'
LOCKSCREEN='Zamknout obrazovku'
MISCMENU='R<>zn<7A>'
MULTIMEDIAMENU='Multim<69>dia'
MUSICMENU='Audio'
NETMENU='Internet'
NEWS='News'
OFFICEMENU='Kancel<65><6C>'
RANDOMBACKGROUND='N<>hodn<64> pozad<61>'
REGENERATEMENU='Obnoven<65> menu'
RELOADITEM='Obnoven<65> konfigurace'
RESTARTITEM='Restart'
RUNCOMMAND='Spustit program...'
SCREENSHOT='Screenshot'
STYLEMENUTITLE='Volba stylu...'
SYSTEMSTYLES='Syst<73>mov<6F> styly'
TERMINALMENU='Termin<69>ly'
TOOLS='N<>stroje'
USERSTYLES='U<>ivatelsk<73> styly'
VIDEOMENU='Video'
WINDOWMANAGERS='Okenn<6E> mana<6E>ery'
WINDOWNAME='Jm<4A>no okna'
WORKSPACEMENU='Seznam ploch'
XUTILSMENU='X-utility'
;;
de_DE*) # german locales
BACKGROUNDMENU='Hintergrundbilder'
BACKGROUNDMENUTITLE='Hintergrundbild setzen'
BROWSERMENU='Internet-Browser'
CONFIGUREMENU='Einstellungen'
EDITORMENU='Editoren'
EXITITEM='Beenden'
FBSETTINGSMENU='Fluxbox-Einstellungen'
FILEUTILSMENU='Datei-Utilities'
FLUXBOXCOMMAND='Fluxbox Befehl'
GAMESMENU='Spiele'
GNOMEMENUTEXT='Gnome-Menues'
GRAPHICMENU='Grafik'
KDEMENUTEXT='Kde-Menues'
LOCKSCREEN='Bildschirmsperre'
MISCMENU='Sonstiges'
MUSICMENU='Musik'
NETMENU='Netzwerk'
OFFICEMENU='Bueroprogramme'
RANDOMBACKGROUND='Zufaelliger Hintergrund'
REGENERATEMENU='Menu-Regeneration'
RELOADITEM='Konfiguration neu laden'
RESTARTITEM='Neustarten'
RUNCOMMAND='Ausf<73>hren'
SCREENSHOT='Bildschirmfoto'
STYLEMENUTITLE='Einen Stil auswaehlen...'
SYSTEMSTYLES='Systemweite Stile'
TERMINALMENU='Terminals'
TOOLS='Helfer'
USERSTYLES='Eigene Stile'
WINDOWMANAGERS='Window Manager'
WINDOWNAME='Window Name'
WORKSPACEMENU='Arbeitsflaechenliste'
XUTILSMENU='X-Anwendungen'
;;
sv_SE*) #Swedish locales
# Ah my Swedish hero. Please help me update the translation
# $ cp fluxbox-generate-menu.in fluxbox-generate-menu.in.orig
# $ $EDITOR fluxbox-generate-menu.in
# $ diff u fluxbox-generate-menu.in.orig fluxbox-generate-menu.in > fbgm.diff
# email fbgm.diff to han@mijncomputer.nl
BACKGROUNDMENU='Bakgrunder'
BACKGROUNDMENUTITLE='S<>tt bakgrund'
BROWSERMENU='Webbl<62>sare'
CONFIGUREMENU='Konfiguration'
EDITORMENU='Editorer'
EXITITEM='Avsluta'
FBSETTINGSMENU='FB-inst<73>llningar'
FILEUTILSMENU='Filverktyg'
FLUXBOXCOMMAND='Fluxbox kommando'
GAMESMENU='Spel'
GNOMEMENUTEXT='Gnome-menyer'
GRAPHICMENU='Grafik'
KDEMENUTEXT='KDE-menyer'
LOCKSCREEN='L<>s sk<73>rm'
MISCMENU='Blandat'
MULTIMEDIAMENU='Multimedia'
MUSICMENU='Musik'
NETMENU='Internet'
OFFICEMENU='Office'
RANDOMBACKGROUND='Slumpm<70>ssig bakgrund'
REGENERATEMENU='Generera meny'
RELOADITEM='Ladda om konfig'
RESTARTITEM='Starta om'
RUNCOMMAND='K<>r'
SCREENSHOT='Sk<53>rmdump'
STYLEMENUTITLE='V<>lj en stil'
SYSTEMSTYLES='Stiler'
TERMINALMENU='Terminaler'
TOOLS='Verktyg'
USERSTYLES='Stiler'
VIDEOMENU='Video'
WINDOWMANAGERS='F<>nsterhanterare'
WINDOWNAME='F<>nsternamn'
WORKSPACEMENU='Arbetsytor'
XUTILSMENU='X-program'
;;
nl_*) #Nederlandse locales
BACKGROUNDMENU='Achtergrond'
BACKGROUNDMENUTITLE='Kies een achtergrond'
BROWSERMENU='Browsers'
CONFIGUREMENU='Instellingen'
EDITORMENU='Editors'
EXITITEM='Afsluiten'
FBSETTINGSMENU='FB-Instellingen'
FILEUTILSMENU='Verkenners'
FLUXBOXCOMMAND='Fluxbox Commando'
GAMESMENU='Spelletjes'
GNOMEMENUTEXT='Gnome-menu'
GRAPHICMENU='Grafisch'
KDEMENUTEXT='KDE-menu'
LOCKSCREEN='Scherm op slot'
MISCMENU='Onregelmatig'
MUSICMENU='Muziek'
NETMENU='Internet'
OFFICEMENU='Office'
RANDOMBACKGROUND='Willekeurige Achtergrond'
REGENERATEMENU='Nieuw Menu'
RELOADITEM='Vernieuw instellingen'
RESTARTITEM='Herstart'
RUNCOMMAND='Voer uit'
SCREENSHOT='Schermafdruk'
STYLEMENUTITLE='Kies een stijl'
SYSTEMSTYLES='Systeem Stijlen'
TERMINALMENU='Terminals'
TOOLS='Gereedschap'
USERSTYLES='Gebruikers Stijlen'
WINDOWMANAGERS='Venster Managers'
WINDOWNAME='Venster Naam'
WORKSPACEMENU='Werkveld menu'
XUTILSMENU='X-Gereedschap'
;;
fi_FI*) #Finnish locales
BACKGROUNDMENU='Taustakuvat'
BACKGROUNDMENUTITLE='M<><4D>rit<69> taustakuva'
BROWSERMENU='Selaimet'
CONFIGUREMENU='Asetukset'
EDITORMENU='Editorit'
EXITITEM='Lopeta'
FBSETTINGSMENU='Fluxboxin s<><73>d<EFBFBD>t'
FILEUTILSMENU='Tiedostoty<74>kalut'
FLUXBOXCOMMAND='Komentorivi'
GAMESMENU='Pelit'
GNOMEMENUTEXT='Gnomen valikot'
GRAPHICMENU='Grafiikka'
KDEMENUTEXT='KDE:n valikot'
LOCKSCREEN='Lukitse ty<74>p<EFBFBD>yt<79>'
MISCMENU='Sekalaista'
MUSICMENU='Musiikki'
NETMENU='Verkko'
OFFICEMENU='Toimistoty<74>kalut'
RANDOMBACKGROUND='Satunnainen taustakuva'
REGENERATEMENU='P<>ivit<69> valikko'
RELOADITEM='P<>ivit<69>'
RESTARTITEM='K<>ynnist<73> uudelleen'
RUNCOMMAND='Suorita'
SCREENSHOT='Kuvakaappaus'
STYLEMENUTITLE='Valitse tyyli'
SYSTEMSTYLES='J<>rjestelm<6C>n tyylit'
TERMINALMENU='Terminaalit'
TOOLS='Ty<54>kalut'
USERSTYLES='K<>ytt<74>j<EFBFBD>n tyylit'
WINDOWMANAGERS='Ikkunanhallintaohjelmat'
WINDOWNAME='Ikkunan nimi'
WORKSPACEMENU='Ty<54>alueet'
XUTILSMENU='X-Ohjelmat'
;;
ja_JP*) #Japanese locales
# Ah my Japanese hero. Please help me update the translation
# $ cp fluxbox-generate-menu.in fluxbox-generate-menu.in.orig
# $ $EDITOR fluxbox-generate-menu.in
# $ diff u fluxbox-generate-menu.in.orig fluxbox-generate-menu.in > fbgm.diff
# email fbgm.diff to han@mijncomputer.nl
BACKGROUNDMENU='<27>ط<EFBFBD>'
BACKGROUNDMENUTITLE='<27>طʤ<D8B7><CAA4><EFBFBD><EFBFBD><EFBFBD>'
BROWSERMENU='<27>֥饦<D6A5><E9A5A6>'
CONFIGUREMENU='<27><><EFBFBD><EFBFBD>'
EDITORMENU='<27><><EFBFBD>ǥ<EFBFBD><C7A5><EFBFBD>'
EXITITEM='<27><>λ'
FBSETTINGSMENU='Fluxbox<6F><78><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
FILEUTILSMENU='<27>ե<EFBFBD><D5A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
FLUXBOXCOMMAND='Fluxbox<6F><78><EFBFBD>ޥ<EFBFBD><DEA5><EFBFBD>'
GAMESMENU='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
GNOMEMENUTEXT='Gnome<6D><65><EFBFBD>˥塼'
GRAPHICMENU='<27><><EFBFBD><EFBFBD>'
KDEMENUTEXT='KDE<44><45><EFBFBD>˥塼'
LOCKSCREEN='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EAA1BC><EFBFBD><EFBFBD><EFBFBD>å<EFBFBD>'
MISCMENU='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
MUSICMENU='<27><><EFBFBD><EFBFBD>'
NETMENU='<27>ͥåȥ<C8A5><EFA1BC>'
OFFICEMENU='<27><><EFBFBD>ե<EFBFBD><D5A5><EFBFBD>(Office)'
RANDOMBACKGROUND='<27>ط<EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)'
REGENERATEMENU='<27><><EFBFBD>˥塼<CBA5>ƹ<EFBFBD><C6B9><EFBFBD>'
RELOADITEM='<27><><EFBFBD>ɤ߹<C9A4><DFB9><EFBFBD>'
RESTARTITEM='<27>Ƶ<EFBFBD>ư'
RUNCOMMAND='<27><><EFBFBD>ޥ<EFBFBD><DEA5>ɤμ¹<CEBC>'
SCREENSHOT='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>󥷥<EFBFBD><F3A5B7A5>å<EFBFBD>'
STYLEMENUTITLE='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...'
SYSTEMSTYLES='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
TERMINALMENU='<27><><EFBFBD><EFBFBD><EFBFBD>ߥʥ<DFA5>'
TOOLS='<27>ġ<EFBFBD><C4A1><EFBFBD>'
USERSTYLES='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
WINDOWMANAGERS='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɥ<EFBFBD><C9A5>ޥ͡<DEA5><CDA1><EFBFBD><EFBFBD><EFBFBD>'
WINDOWNAME='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɥ<EFBFBD>̾'
WORKSPACEMENU='<27><EFBFBD><EFA1BC><EFBFBD><EFBFBD><EFBFBD>ڡ<EFBFBD><DAA1><EFBFBD>'
XUTILSMENU='X<><EFBFBD>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD>ƥ<EFBFBD>'
;;
fr_FR*) # french locales
# Ah my french hero. Please help me update the translation
# $ cp fluxbox-generate-menu.in fluxbox-generate-menu.in.orig
# $ $EDITOR fluxbox-generate-menu.in
# $ diff u fluxbox-generate-menu.in.orig fluxbox-generate-menu.in > fbgm.diff
# email fbgm.diff to han@mijncomputer.nl
BACKGROUNDMENU="Fond d'<27>cran"
BACKGROUNDMENUTITLE="Changer le fond d'<27>cran"
BROWSERMENU='Navigateurs'
CONFIGUREMENU='Configurer'
EDITORMENU='Editeurs'
EXITITEM='Sortir'
FBSETTINGSMENU='Configurer Fluxbox'
FILEUTILSMENU='Outils fichiers'
FLUXBOXCOMMAND='Commande Fluxbox'
GAMESMENU='Jeux'
GNOMEMENUTEXT='Menus Gnome'
GRAPHICMENU='Graphisme'
KDEMENUTEXT='Menus KDE'
LOCKSCREEN="Verouiller l'<27>cran"
MISCMENU='Divers'
MUSICMENU='Musique'
NETMENU='R<>seau'
OFFICEMENU='Bureautique'
RANDOMBACKGROUND="Fond d'<27>cran al<61>atoire"
REGENERATEMENU='R<>g<EFBFBD>n<EFBFBD>rer le menu'
RELOADITEM='Recharger la configuration'
RESTARTITEM='Red<65>marrer Fluxbox'
RUNCOMMAND='Run'
SCREENSHOT="Capture d'<27>cran"
STYLEMENUTITLE='Choisir un style...'
SYSTEMSTYLES='Styles Systeme'
TERMINALMENU='Terminaux'
TOOLS='Outils'
USERSTYLES='Styles Utilisateur'
WINDOWMANAGERS='Gestionnaires de fen<65>tres'
WINDOWNAME='Nom de la fenetre'
WORKSPACEMENU='Liste des bureaux'
XUTILSMENU='Outils X'
;;
it_IT*) # italian locales
BACKGROUNDMENU='Sfondi'
BACKGROUNDMENUTITLE='Imposta lo sfondo'
BROWSERMENU='Browsers'
CONFIGUREMENU='Configurazione'
EDITORMENU='Editori'
EXITITEM='Esci'
FBSETTINGSMENU='Preferenze'
FILEUTILSMENU='Utilit<69>'
FLUXBOXCOMMAND='Comando Fluxbox'
GAMESMENU='Giochi'
GNOMEMENUTEXT='Gnome'
GRAPHICMENU='Grafica'
KDEMENUTEXT='KDE'
LOCKSCREEN='Blocca lo schermo'
MISCMENU='Varie'
MUSICMENU='Musica'
NETMENU='Internet'
OFFICEMENU='Office'
RANDOMBACKGROUND='Sfondo casuale'
REGENERATEMENU='Rigenera il menu'
RELOADITEM='Rileggi la configurazione'
RESTARTITEM='Riavvia'
RUNCOMMAND='Esegui'
SCREENSHOT='Schermata'
STYLEMENUTITLE='Scegli uno stile'
SYSTEMSTYLES='Stile'
TERMINALMENU='Terminali'
TOOLS='Attrezzi'
USERSTYLES='Stile'
WINDOWMANAGERS='Gestori finestre'
WINDOWNAME='Nome della finestra'
WORKSPACEMENU='Aree di lavoro'
XUTILSMENU='Utilit<69> X'
;;
ro_RO*) # Romanian locales
# Ah my Romanian hero. Please help me update the translation
# $ cp fluxbox-generate-menu.in fluxbox-generate-menu.in.orig
# $ $EDITOR fluxbox-generate-menu.in
# $ diff u fluxbox-generate-menu.in.orig fluxbox-generate-menu.in > fbgm.diff
# email fbgm.diff to han@mijncomputer.nl
BACKGROUNDMENU='Fundaluri'
BACKGROUNDMENUTITLE='Alege fundalul'
BROWSERMENU='Navigatoare'
CONFIGUREMENU='Configurare'
EDITORMENU='Editoare'
EXITITEM='Iesire'
FBSETTINGSMENU='Meniul Fluxbox'
FILEUTILSMENU='Utilitare de fisier'
FLUXBOXCOMMAND='Comanda Fluxbox'
GAMESMENU='Jocuri'
GNOMEMENUTEXT='Meniu Gnome'
GRAPHICMENU='Grafica'
KDEMENUTEXT='Meniu KDE'
LOCKSCREEN='Incuie ecranul'
MISCMENU='Diverse'
MULTIMEDIAMENU='Multimedia'
MUSICMENU='Muzica'
NETMENU='Retea'
OFFICEMENU='Office'
RANDOMBACKGROUND='Fundal aleator'
REGENERATEMENU='Regenereaza meniul'
RELOADITEM='Reincarca configuratia'
RESTARTITEM='Restart'
RUNCOMMAND='Lanseaza'
SCREENSHOT='Captura ecran'
STYLEMENUTITLE='Alege un stil...'
SYSTEMSTYLES='Stiluri sistem'
TERMINALMENU='Terminale'
TOOLS='Unelte'
USERSTYLES='Stiluri utilizator'
WINDOWMANAGERS='WindowManagers'
WINDOWNAME='Nume fereastra'
WORKSPACEMENU='Lista workspace-uri'
XUTILSMENU='Utilitare X'
;;
es_ES*) # spanish locales
# Ah my Spanish hero. Please help me update the translation
# $ cp fluxbox-generate-menu.in fluxbox-generate-menu.in.orig
# $ $EDITOR fluxbox-generate-menu.in
# $ diff u fluxbox-generate-menu.in.orig fluxbox-generate-menu.in > fbgm.diff
# email fbgm.diff to han@mijncomputer.nl
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'
BACKGROUNDMENU='Fondos'
FILEUTILSMENU='Utilidades'
FLUXBOXCOMMAND='Comandos de Fluxbox'
LOCKSCREEN='Bloquear Pantalla'
RANDOMBACKGROUND='Fondo Aleatoreo'
REGENERATEMENU='Regenerar Men<65>'
RUNCOMMAND='Ejecutar'
SCREENSHOT='Captura de Pantalla'
TOOLS='Herramienta'
WINDOWMANAGERS='Gestores de Ventanas'
WINDOWNAME='Nombre de Ventana'
;;
pl_PL*) # Polish locales
# Ah my Russian hero. Please help me update the translation
# $ cp fluxbox-generate-menu.in fluxbox-generate-menu.in.orig
# $ $EDITOR fluxbox-generate-menu.in
# $ diff u fluxbox-generate-menu.in.orig fluxbox-generate-menu.in > fbgm.diff
# email fbgm.diff to han@mijncomputer.nl
BACKGROUNDMENU='Tapety'
BACKGROUNDMENUTITLE='Ustaw tapet<65>'
BROWSERMENU='Przegl<67>darki'
CONFIGUREMENU='Konfiguracja'
EDITORMENU='Edytory'
EXITITEM='Wyj<79>cie'
FBSETTINGSMENU='Menu Fluxbox'
FILEUTILSMENU='Narz<72>dzia do plik<69>w'
FLUXBOXCOMMAND='Polecenia Fluxbox'
GAMESMENU='Gry'
GNOMEMENUTEXT='Menu Gnome'
GRAPHICMENU='Grafika'
KDEMENUTEXT='Menu KDE'
LOCKSCREEN='Zablokuj ekran'
MISCMENU='R<><52>ne'
MULTIMEDIAMENU='Multimedia'
MUSICMENU='Muzyka'
NETMENU='Sie<69>'
OFFICEMENU='Aplikacje biurowe'
RANDOMBACKGROUND='Losowa tapeta'
REGENERATEMENU='Wygeneruj menu'
RELOADITEM='Od<4F>wie<69> konfiguracj<63>'
RESTARTITEM='Restartuj'
RUNCOMMAND='Uruchom...'
SCREENSHOT='Zrzut ekranu'
STYLEMENUTITLE='Wybierz styl...'
SYSTEMSTYLES='Style systemowe'
TERMINALMENU='Terminale'
TOOLS='Narz<72>dzia'
USERSTYLES='Style u<>ytkownika'
WINDOWMANAGERS='Menad<61>ery okien'
WINDOWNAME='Nazwy okien'
WORKSPACEMENU='Lista pulpit<69>w'
XUTILSMENU='Narz<72>dzia X'
;;
pt_PT*) # Portuguese locales
BACKGROUNDMENU='Imagens de Fundo'
BACKGROUNDMENUTITLE='Definir Imagem de Fundo'
BROWSERMENU='Browsers'
CONFIGUREMENU='Configura<72><61>o'
EDITORMENU='Editores'
EXITITEM='Sair'
FBSETTINGSMENU='Menu Fluxbox'
FILEUTILSMENU='Utilit<69>rios de Ficheiros'
FLUXBOXCOMMAND='Comando Fluxbox'
GAMESMENU='Jogos'
GNOMEMENUTEXT='Menu Gnome'
GRAPHICMENU='Gr<47>ficos'
KDEMENUTEXT='Menu KDE'
LOCKSCREEN='Trancar Ecr<63>'
MISCMENU='Misc.'
MULTIMEDIAMENU='Multim<69>dia'
MUSICMENU='<27>udio'
NETMENU='Rede'
OFFICEMENU='Escrit<69>rio'
RANDOMBACKGROUND='Imagem Aleat<61>ria'
REGENERATEMENU='Regenerar Menu'
RELOADITEM='Recarregar configura<72><61>o'
RESTARTITEM='Reiniciar'
RUNCOMMAND='Executar'
SCREENSHOT='Capturar Ecr<63>'
STYLEMENUTITLE='Escolha um estilo...'
SYSTEMSTYLES='Estilos do Sistema'
TERMINALMENU='Terminais'
TOOLS='Ferramentas'
USERSTYLES='Estilos do Utilizador'
VIDEOMENU='V<>deo'
WINDOWMANAGERS='Gestores de Janelas'
WINDOWNAME='Nome da Janela'
WORKSPACEMENU='Lista de <20>reas de Trabalho'
XUTILSMENU='Utilit<69>rios X'
;;
*)
;;
esac
# Set Defaults
MENUFILENAME="${MENUFILENAME:=${HOME}/.fluxbox/menu}"
MENUTITLE="${MENUTITLE:=Fluxbox}"
HOMEPAGE="${HOMEPAGE:=fluxbox.org}"
USERMENU="${USERMENU:=${HOME}/.fluxbox/usermenu}"
# Read the menuconfig file if it exists or else create it.
# But not during install time, use envvar for sun
if [ ! "${INSTALL}" = Yes ]; then
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
cat << EOF > ${HOME}/.fluxbox/menuconfig
# 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. Put the command in quotes if you want to use
# options. Put a backslash in before odd chars
# MY_TERM='Eterm --tint \#123456'
# MY_TERM='aterm -tint \$(random_color)'
# Your favourite browser. You can also specify options.
# MY_BROWSER=mozilla
# Name of the outputfile
# MENUFILENAME=${HOME}/.fluxbox/menu
# MENUTITLE=\`fluxbox -version|cut -d " " -f-2\`
# standard url for console-browsers
# HOMEPAGE=fluxbox.org
# location with your own menu-entries
# USERMENU=~/.fluxbox/usermenu
# Put the launcher you would like to use here
# LAUNCHER=fbrun
# LAUNCHER=fbgm
# Options for fbrun
# FBRUNOPTIONS='-font 10x20 -fg grey -bg black -title run'
# --- PREFIX'es
# These are prefixes; So if fluxbox is installed in /usr/bin/fluxbox
# your prefix is: /usr
# fluxbox-generate already looks in /usr/X11R6, /usr, /usr/local and /opt so
# there should be no need to specify them.
#
# PREFIX=@PREFIX@
# GNOME_PREFIX=/opt/gnome
# KDE_PREFIX=/opt/kde
# Sepparate the list of background-dirs with semicolumns ':'
# BACKGROUND_DIRS="${HOME}/.fluxbox/backgrounds/:@PREFIX@/share/fluxbox/backgrounds/:/usr/share/wallpapers"
# --- Boolean variables.
# 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.
# 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
else
echo "Warning: I couldn't create ${HOME}/.fluxbox/menuconfig" >&2
fi
fi
fi
fi
testoption() {
if [ -z "$3" -o -n "`echo $3|grep '^-'`" ]; then
echo "Error: The option $2 requires an argument." >&2
exit 1
fi
case $1 in
ex) # executable
if find_it "$3"; then
:
else
echo "Error: The option $2 needs an executable as argument, and \`$3' is not." >&2
fi
;;
di) # directory
if [ -d "$3" ]; then
:
else
echo "Error: The option $2 needs a directory as argument, and \`$3' is not." >&2
fi
;;
fl) # file
if [ -r "$3" ]; then
:
else
echo "Error: The option $2 needs a readable file as argument, and \`$3' is not." >&2
fi
;;
sk) # skip
:
;;
esac
}
# Get options.
while [ $# -gt 0 ]; do
case "$1" in
-B) BACKGROUNDMENUITEM=yes; shift;;
-k) KDEMENU=yes; shift;;
-g) GNOMEMENU=yes; shift;;
-in) NO_ICON=yes; shift;;
-is) OTHER_ICONPATHS="
/usr{,/local}/share{,/xclass}/{icons,pixmaps}
/usr{,/local}/share/icons/mini
/usr{,/local}/{,X11R6/}share/icons/{default.kde,hicolor}/16x16/*
"
shift;;
-ds) OTHER_DESKTOP_PATHS="
/usr/share/mimelnk
/usr/share/applications
/usr/share/xsessions
/usr/share/services
"
# /usr/share/apps \
shift;;
-i) USER_ICONPATHS=${2};
#needs testing
for aPath in $2; do
testoption di $1 $aPath;
done
shift 2;;
-d) USER_DESKTOP_PATHS=${2};
#needs testing
for aPath in $2; do
testoption di $1 $aPath;
done
shift 2;;
-t) MY_TERM=${2}; testoption ex $1 $2; shift 2;;
-b) MY_BROWSER=${2}; testoption ex $1 $2; shift 2;;
-o) MENUFILENAME=${2}; shift 2; CHECKINIT=NO ;;
-p) PREFIX=${2}; testoption di $1 $2; shift 2;;
-n) GNOME_PREFIX=${2}; testoption di $1 $2; shift 2;;
-q) KDE_PREFIX=${2}; testoption di $1 $2; shift 2;;
-m) MENUTITLE=${2}; testoption sk $1 $2; shift 2;;
-w) HOMEPAGE=${2}; testoption sk $1 $2; shift 2;;
-u) USERMENU=${2}; testoption fl $1 $2; shift 2;;
-r) REMOVE=no; shift;;
-h) display_help ; exit 0 ;;
-a) display_authors ; exit 0 ;;
--*) echo "fluxbox-generate_menu doesn't recognize -- gnu-longopts."
echo 'Use fluxbox-generate_menu -h for a long help message.'
display_usage
exit 1 ;;
-[a-zA-Z][a-zA-Z]*)
# split concatenated single-letter options apart
FIRST="$1"; shift
set -- `echo "$FIRST" | sed 's/^-\(.\)\(.*\)/-\1 -\2/'` "$@"
;;
-*)
echo 1>&2 "fluxbox-generate_menu: unrecognized option "\`"$1'"
display_usage
exit 1
;;
*)
break
;;
esac
done
# Check defaults
# Can we actually create ${MENUFILENAME}
touch ${MENUFILENAME} 2> /dev/null
if [ $? -ne 0 ]; then
echo "Fatal error: can't create or write to $MENUFILENAME" >&2
exit 1
fi
# backup menu
if [ -w "${MENUFILENAME}" ]; then
if [ -f ${MENUFILENAME}.firstbak ]; then
cp ${MENUFILENAME} ${MENUFILENAME}.firstbak
fi
if [ -s "${MENUFILENAME}" ]; then
mv ${MENUFILENAME} ${MENUFILENAME}.bak
fi
fi
# prefix
PREFIX="${PREFIX:=@PREFIX@}"
if [ -z "${PREFIX}" -o ! -d "${PREFIX}" ]; then
PREFIX=`which fluxbox | sed 's,/bin/fluxbox$,,'`
fi
# gnome prefix
for GNOME_PREFIX in "${GNOME_PREFIX}" /usr/local /usr/X11R6 /usr /opt "${PREFIX}"; do
if [ -n "${GNOME_PREFIX}" -a -d "$GNOME_PREFIX/share/gnome" ]; then
break;
fi
done
# Will remain $PREFIX if all else fails
# kde prefix
for KDE_PREFIX in "${KDE_PREFIX}" /usr/local /usr/X11R6 /usr /opt "${PREFIX}"; do
if [ -n "${KDE_PREFIX}" -a -d "$KDE_PREFIX/share/applnk" ]; then
break;
fi
done
if [ -z "${INSTALL}" ] && [ -z "${NO_ICON}" ]; then
# [ -z "$dnlamVERBOSE" ] && dnlamVERBOSE=": echo" # for debugging
FB_ICONDIR="$HOME/.fluxbox/icons"
[ -d "$FB_ICONDIR" ] || mkdir "$FB_ICONDIR"
ICONMAPPING="$HOME/.fluxbox/iconmapping"
if [ "$GNOMEMENU" ] ; then
OTHER_DESKTOP_PATHS="\"$HOME/.gnome/apps\" \"${GNOME_PREFIX}/share/gnome/apps\" $OTHER_DESKTOP_PATHS"
#[ "OTHER_ICONPATHS" ] && OTHER_ICONPATHS=
fi
if [ "$KDEMENU" ] ; then
OTHER_DESKTOP_PATHS="\"$HOME/.kde/share/applnk\" \"${KDE_PREFIX}/share/applnk\" $OTHER_DESKTOP_PATHS"
[ "OTHER_ICONPATHS" ] && OTHER_ICONPATHS="\"$HOME\"/.kde/share/icons/{,*} $OTHER_ICONPATHS"
fi
[ "$GNOMEMENU$KDEMENU" ] && OTHER_DESKTOP_PATHS="\"$ETCAPPLNK\" $OTHER_DESKTOP_PATHS"
checkDirs(){
#echo checkDirs: $* >&2
local CHECKED_DIRS=""
for DIR in "$@"; do
if [ -d "$DIR" ]; then
# todo: should check if there are duplicates
CHECKED_DIRS="$CHECKED_DIRS \"$DIR\""
fi
done
#echo checkDirs - $CHECKED_DIRS >&2
echo $CHECKED_DIRS
}
OTHER_ICONPATHS=`eval checkDirs $OTHER_ICONPATHS`
OTHER_DESKTOP_PATHS=`eval checkDirs $OTHER_DESKTOP_PATHS`
# $dnlamVERBOSE "Using USER_DESKTOP_PATHS=\"$USER_DESKTOP_PATHS\" and USER_ICONPATHS=\"$USER_ICONPATHS\""
# $dnlamVERBOSE "Using OTHER_ICONPATHS=$OTHER_ICONPATHS"
# $dnlamVERBOSE "Using OTHER_DESKTOP_PATHS=$OTHER_DESKTOP_PATHS"
# $dnlamVERBOSE "Calling function: createIconMapping"
# $dnlamVERBOSE "Creating $ICONMAPPING" >&2
touch "$ICONMAPPING"
eval createIconMapping $USER_DESKTOP_PATHS $OTHER_DESKTOP_PATHS
# $dnlamVERBOSE "Done createIconMapping."
fi
# directory for the backgrounds
if [ -z "$BACKGROUND_DIRS" ]; then
BACKGROUND_DIRS="${HOME}/.fluxbox/backgrounds/:${PREFIX}/share/fluxbox/backgrounds/"
fi
# find the default terminal
if find_it_options $MY_TERM; then
DEFAULT_TERM=$MY_TERM
else
[ -n "$MY_TERM" ] && echo "Warning: you chose an invalid term." >&2
#The precise order is up for debate.
for term in Eterm urxvt urxvtc aterm rxvt wterm xterm konsole gnome-terminal; do
if find_it $term; then
DEFAULT_TERM=$term
break
fi
done
fi
# a unix system without any terms. that's odd
if [ -z "$DEFAULT_TERM" ]; then
cat << EOF >&2
Warning: I can't find any terminal-emulators in your PATH. Please fix
your PATH or specify your favourite terminal-emulator with the -t option
EOF
DEFAULT_TERM=xterm
fi
DEFAULT_TERMNAME=`echo $DEFAULT_TERM|awk '{print $1}'`
DEFAULT_TERMNAME=`basename $DEFAULT_TERMNAME`
# find the default browser
if find_it_options $MY_BROWSER; then
DEFAULT_BROWSER=$MY_BROWSER
else
[ -n "$MY_BROWSER" ] && echo "Warning: you chose an invalid browser." >&2
#The precise order is up for debate.
for browser in firefox mozilla-firefox mozilla-firebird MozillaFirebird opera skipstone mozilla galeon konqueror dillo netscape w3m links lynx; do
if find_it $browser; then
DEFAULT_BROWSER=$browser
break
fi
done
fi
DEFAULT_BROWSERNAME=`echo $DEFAULT_BROWSER|awk '{print $1}'`
DEFAULT_BROWSERNAME=`basename $DEFAULT_BROWSERNAME`
# Start of menu
cat << EOF > ${MENUFILENAME}
# Generated by fluxbox-generate_menu
#
# If you read this it means you want to edit this file manually, so here
# are some useful tips:
#
# - You can add your own menu-entries to ~/.fluxbox/usermenu
#
# - If you miss apps please let me know and I will add them for the next
# release.
#
# - The -r option prevents removing of empty menu entries and lines which
# makes things 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
EOF
echo "[begin] (${MENUTITLE})" >> ${MENUFILENAME}
append "[exec] (${DEFAULT_TERMNAME}) {${DEFAULT_TERM}}"
case "$DEFAULT_BROWSERNAME" in
links|w3m|lynx) append "[exec] (${DEFAULT_BROWSERNAME}) {${DEFAULT_TERM} -e ${DEFAULT_BROWSER} ${HOMEPAGE}}" ;;
firefox|firebird|mozilla|phoenix|galeon|dillo|netscape) append "[exec] (${DEFAULT_BROWSERNAME}) {${DEFAULT_BROWSER}}" ;;
konqueror) append "[exec] (konqueror) {kfmclient openProfile webbrowsing}" ;;
opera) append "[exec] (opera) {env QT_XFT=true opera}" ;;
MozillaFirebird) append "[exec] (firebird) {MozillaFirebird}" ;;
MozillaFirefox) append "[exec] (firefox) {MozillaFirefox}" ;;
*) append "[exec] ($DEFAULT_BROWSERNAME) {$DEFAULT_BROWSER}" ;;
esac
find_it "${LAUNCHER}" append "[exec] (${RUNCOMMAND}) {${LAUNCHER} $FBRUNOPTIONS}"
append_submenu "${TERMINALMENU}"
normal_find xterm urxvt urxvtc gnome-terminal multi-gnome-terminal Eterm \
konsole aterm mlterm multi-aterm rxvt
append_menu_end
append_submenu "${NETMENU}"
append_submenu "${BROWSERMENU}"
normal_find firefox mozilla-firefox MozillaFirefox galeon mozilla dillo netscape vncviewer
find_it links append "[exec] (links-graphic) {links -driver x ${HOMEPAGE}}"
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}}"
append_menu_end
append_submenu IM
normal_find gaim kopete gnomemeeting sim kadu psi amsn
find_it licq append "[exec] (licq) {env QT_XFT=true licq}"
cli_find centericq micq
append_menu_end
append_submenu Mail
normal_find sylpheed kmail evolution thunderbird mozilla-thunderbird \
sylpheed-claws
cli_find mutt pine
append_menu_end
append_submenu News
normal_find liferea pears
cli_find slrn tin
append_menu_end
append_submenu IRC
normal_find xchat xchat-2 ksirc vyqchat lostirc logui konversation kvirc
cli_find irssi epic4 weechat ninja
find_it BitchX append "[exec] (BitchX) {${DEFAULT_TERM} -e BitchX -N}" || \
find_it bitchx append "[exec] (BitchX) {${DEFAULT_TERM} -e bitchx -N}"
find_it ircii append "[exec] (ircii) {${DEFAULT_TERM} -e ircii -s}"
append_menu_end
append_submenu P2P
normal_find gtk-gnutella lopster nicotine pyslsk xmule amule \
Valknut dcgui-qt dc_qt quickdc asami
cli_find TekNap giFTcurs
append_menu_end
append_submenu ftp
normal_find gftp IglooFTP-PRO
cli_find ncftp pftp ftp lftp yafc
append_menu_end
normal_find pan xnmap skype x3270
append_menu_end
append_submenu "${EDITORMENU}"
normal_find gvim bluefish nedit gedit xedit kword kwrite kate anjuta \
wings xemacs emacs kvim cream evim scite
cli_find nano vim vi zile jed joe
find_it emacs append "[exec] (emacs-nw) {${DEFAULT_TERM} -e emacs -nw}"
find_it xemacs append "[exec] (xemacs-nw) {${DEFAULT_TERM} -e xemacs -nw}"
append_menu_end
append_submenu "${FILEUTILSMENU}"
find_it konqueror append "[exec] (konqueror) {kfmclient openProfile filemanagement}"
normal_find gentoo krusader kcommander linuxcmd rox tuxcmd krename xfe xplore
find_it nautilus append "[exec] (nautilus) {nautilus --no-desktop --browser}"
cli_find mc
append_menu_end
append_submenu "${MULTIMEDIAMENU}"
append_submenu "${GRAPHICMENU}"
normal_find gimp gimp2 gimp-2.2 inkscape sodipodi xv gqview showimg xpaint kpaint kiconedit \
ee xzgv xscreensaver-demo xlock gphoto tuxpaint
find_it xnview append "[exec] (xnview browser) {xnview -browser}"
find_it blender append "[exec] (blender) {blender -w}"
find_it gears append "[exec] (Mesa gears) {gears}"
find_it morph3d append "[exec] (Mesa morph) {morph3d}"
find_it reflect append "[exec] (Mesa reflect) {reflect}"
append_menu_end
append_submenu "${MUSICMENU}"
normal_find xmms noatun alsaplayer gqmpeg aumix xmixer gnome-alsamixer gmix kmix kscd \
grecord kmidi xplaycd soundtracker grip easytag audacity \
zinf rhythmbox kaboodle beep-media-player amarok
cli_find cdcd cplay alsamixer orpheus mp3blaster
append_menu_end
append_submenu "${VIDEOMENU}"
normal_find xine aviplay gtv gmplayer xmovie xcdroast xgdb realplay xawtv fxtv ogle goggles vlc
find_it dvdrip append "[exec] (dvdrip) {nohup dvdrip}"
append_menu_end
append_submenu "${XUTILSMENU}"
normal_find xfontsel xman xload xfigxbiff editres viewres xclock \
xmag wmagnify gkrellm gkrellm2 vmware portagemaster celestia
find_it xrdb append "[exec] (Reload .Xdefaults) {xrdb -load $HOME/.Xdefaults}"
append_menu_end
append_menu_end
append_submenu "${OFFICEMENU}"
normal_find xclock xcalc kcalc gv
find_it gcalc append "[exec] (gcalc) {gcalc}" || \
find_it gnome-calculator append "[exec] (gcalc) {gnome-calculator}"
for ext in s o xo; do
find_it ${ext}office append "[exec] (Open Office) {${ext}office}"
find_it ${ext}ocalc append "[exec] (OO Calc) {${ext}ocalc}"
find_it ${ext}owriter append "[exec] (OO Writer) {${ext}owriter}"
find_it ${ext}oimpress append "[exec] (OO Impress) {${ext}oimpress}"
find_it ${ext}odraw append "[exec] (OO Draw) {${ext}odraw}"
find_it ${ext}omath append "[exec] (OO Math) {${ext}omath}"
find_it ${ext}opadmin append "[exec] (OO Printer Admin) {${ext}opadmin}"
find_it mrproject append "[exec] (Mr.Project) {mrproject}"
done
normal_find abiword kword wordperfect katoob acroread xpdf lyx
normal_find dia xfig
append_menu_end
append_submenu "${GAMESMENU}"
normal_find bzflag gnibbles gnobots2 tuxpuck gataxx glines \
gnect mahjongg gnomine gnome-stones gnometris gnotravex \
gnotski iagno knights eboard xboard scid freecell pysol \
gtali tuxracer xpenguins xsnow xeyes xpenguins smclone \
openmortal quake2 quake3 skoosh same-gnome enigma xbill \
icebreaker scorched3d sol dosbox black-box enigma freeciv \
freeciv-server frozen-bubble liquidwar qt-nethack \
nethack-gnome pathological scummvm xqf \
wesnoth canfeild ace_canfeild golf merlin chickens \
supertux tuxdash neverball cube_client blackjack \
doom doom3 blackshades gltron kpoker
cli_find gnugo
find_it et append "[exec] (Enemy Territory) {et}"
find_it ut append "[exec] (Unreal Tournament) {ut}"
find_it ut2003 append "[exec] (Unreal Tournament 2003) {ut2003}"
find_it ut2004 append "[exec] (Unreal Tournament 2004) {ut2004}"
append_menu_end
# We'll only use this once
ETCAPPLNK=/etc/X11/applnk
PARSING_DESKTOP="true"
# gnome menu
if [ "${GNOMEMENU}" ]; then
append_submenu "${GNOMEMENUTEXT}"
recurse_dir_menu "${GNOME_PREFIX}/share/gnome/apps" "$HOME/.gnome/apps" ${ETCAPPLNK}
append_menu_end
unset ETCAPPLNK
fi
# kde submenu
if [ -d "${KDE_PREFIX}/share/applnk/" -a "${KDEMENU}" ]; then
append_submenu "${KDEMENUTEXT}"
recurse_dir_menu "${KDE_PREFIX}/share/applnk" "$HOME/.kde/share/applnk" ${ETCAPPLNK}
append_menu_end
unset ETCAPPLNK
fi
unset PARSING_DESKTOP
#User menu
if [ -r "${USERMENU}" ]; then
cat ${USERMENU} >> ${MENUFILENAME}
fi
append_submenu "${FBSETTINGSMENU}"
append "[config] (${CONFIGUREMENU})"
append_menu "[submenu] (${SYSTEMSTYLES}) {${STYLEMENUTITLE}}"
append "[stylesdir] (${PREFIX}/share/fluxbox/styles)"
append_menu_end
append_menu "[submenu] (${USERSTYLES}) {${STYLEMENUTITLE}}"
append "[stylesdir] (~/.fluxbox/styles)"
append_menu_end
# Backgroundmenu
addbackground() {
picturename=`basename "$1"`
append "[exec] (${picturename%.???}) {fbsetbg -a \"$1\" }"
}
if [ "$BACKGROUNDMENUITEM" = yes ]; then
IFS=: # set delimetor for find
NUMBER_OF_BACKGROUNDS=`find $BACKGROUND_DIRS -follow -type f 2> /dev/null|wc -l`
if [ "$NUMBER_OF_BACKGROUNDS" -gt 0 ]; then
append_menu "[submenu] (${BACKGROUNDMENU}) {${BACKGROUNDMENUTITLE}}"
append "[exec] (${RANDOMBACKGROUND}) {fbsetbg -r ${HOME}/.fluxbox/backgrounds}"
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
append_menu_end
else
echo "Warning: You wanted a background-menu but I couldn't find any backgrounds in:
$BACKGROUND_DIRS" >&2
fi
fi
append "[workspaces] (${WORKSPACEMENU})"
append_submenu ${TOOLS}
normal_find fluxconf fluxkeys fluxmenu
# if gxmessage exitst use it; else use xmessage
find_it gxmessage append \
"[exec] (${WINDOWNAME}) {xprop WM_CLASS|cut -d \\\" -f 2|gxmessage -file - -center}" || \
find_it xmessage append \
"[exec] (${WINDOWNAME}) {xprop WM_CLASS|cut -d \\\" -f 2|xmessage -file - -center}"
find_it import append "[exec] (${SCREENSHOT} - JPG) {import screenshot.jpg && display -resize 50% screenshot.jpg}"
find_it import append "[exec] (${SCREENSHOT} - PNG) {import screenshot.png && display -resize 50% screenshot.png}"
find_it ${LAUNCHER} append "[exec] (${RUNCOMMAND}) {${LAUNCHER} $FBRUNOPTIONS}"
find_it switch append "[exec] (gtk-theme-switch) {switch}"
find_it switch2 append "[exec] (gtk2-theme-switch) {switch2}"
find_it fluxbox-generate_menu append "[exec] (${REGENERATEMENU}) {fluxbox-generate_menu}"
append_menu_end
append_submenu ${WINDOWMANAGERS}
#hard to properly maintain since there are so many exceptions to the rule.
for wm in icewm ion kde sawfish enlightenment fvwm openbox evilwm waimea xfce pekwm; do
find_it start${wm} append "[restart] (${wm}) {start${wm}}" ||\
find_it ${wm} append "[restart] (${wm}) {${wm}}"
done
find_it startgnome append "[restart] (gnome) {startgnome}" ||\
find_it gnome-session append "[restart] (gnome) {gnome-session}"
find_it startwindowmaker append "[restart] (windowmaker) {startwindowmaker}" ||\
find_it wmaker append "[restart] (windowmaker) {wmaker}"
append_menu_end
find_it xlock append "[exec] (${LOCKSCREEN}) {xlock}" ||\
find_it xscreensaver-command append "[exec] (${LOCKSCREEN}) {xscreensaver-command -lock}"
append "[commanddialog] (${FLUXBOXCOMMAND})"
append "[reconfig] (${RELOADITEM})"
append "[restart] (${RESTARTITEM})"
append "[exec] (${ABOUTITEM}) {(fluxbox -v; fluxbox -info | sed 1d) 2> /dev/null | xmessage -file - -center}"
append "[separator]"
append "[exit] (${EXITITEM})"
append_menu_end
append_menu_end
# this function removes empty menu items. It can not yet remove nested
# empty submenus :\
if [ ! "${REMOVE}" ]; then
clean_up
fi
# escapes any parentheses in menu label
# e.g., "[exec] (konqueror (web))" becomes "[exec] (konqueror (web\))"
sed 's/(\(.*\)(\(.*\)))/(\1 (\2\\))/' $MENUFILENAME > menu.tmp
mv -f menu.tmp $MENUFILENAME
if [ -z "$INSTALL" ]; then
if [ -z "$CHECKINIT" ]; then
INITMENUFILENAME=`awk '/menuFile/ {print $2}' $HOME/.fluxbox/init`
INITMENUFILENAME=`replaceWithinString "$INITMENUFILENAME" "~" "$HOME"`
if [ ! "$INITMENUFILENAME" = "$MENUFILENAME" ]; then
echo "Note: In $HOME/.fluxbox/init, your \"session.menuFile\" does not point to $MENUFILENAME but to $INITMENUFILENAME" >&2
fi
fi
echo "Menu successfully generated: $MENUFILENAME"
#echo " Make sure \"session.menuFile: $MENUFILENAME\" is in $HOME/.fluxbox/init."
echo 'Use fluxbox-generate_menu -h to read about all the latest features.'
fi