526 lines
14 KiB
Bash
Executable file
526 lines
14 KiB
Bash
Executable file
#!/bin/sh
|
||
# generate_menu for Fluxbox
|
||
# Copyright (c) 2001-2002 Henrik Kinnunen (fluxgen@linuxmail.org)
|
||
#
|
||
# 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 -u` -eq 0 ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin
|
||
|
||
# Functions
|
||
display_usage() {
|
||
cat <<EOF
|
||
|
||
fluxbox-genrate_menu
|
||
Usage: fluxbox-generate_menu [-kg] [-o /path]
|
||
[-p /path] [-m menu-title]
|
||
Options:
|
||
|
||
-t Favourite terminal.
|
||
-k Insert a kde menu
|
||
-g Add a gnome menu
|
||
-o Outputfile; default is ~/.fluxbox/menu
|
||
-m Menu-title; default is "Fluxbox"
|
||
|
||
-h Display this help
|
||
-a Display the authors of this script
|
||
|
||
only for packagers:
|
||
|
||
-p Package-datadir; default is /usr/share
|
||
-n Gnome-datadir; default is Package-datadir
|
||
-q KDE-datadir; default is Package-datadir
|
||
|
||
EOF
|
||
}
|
||
|
||
display_help() {
|
||
cat <<EOF
|
||
|
||
This program generates a menu-file for fluxbox.
|
||
Use fluxbox-generate_menu -h for brief usage instructions
|
||
|
||
EOF
|
||
}
|
||
|
||
display_authors() {
|
||
WHOAMI=`whoami`
|
||
cat <<EOF
|
||
|
||
fluxbox-generate_menu was brought to you by:
|
||
|
||
Henrik Kinnunnen: Project leader.
|
||
Han Boetes: Packaging, debugging and scripts.
|
||
Jeramy B. Smith: Packaging assistance, gnome and kde menu system.
|
||
Xyrnix: Mysterious guest developer who made find_it module.
|
||
Filippo Pappalardo: Italian locales and -t option.
|
||
$WHOAMI: Innocent bystander.
|
||
|
||
EOF
|
||
}
|
||
|
||
find_it() {
|
||
which $1 > /dev/null 2> /dev/null && shift && $*
|
||
}
|
||
|
||
append() {
|
||
echo " $*" >> ${FILENAME}
|
||
}
|
||
|
||
append_menu() {
|
||
echo "$*" >> ${FILENAME}
|
||
}
|
||
|
||
append_submenu() {
|
||
echo >> ${FILENAME}
|
||
append_menu "[submenu] ($1)"
|
||
}
|
||
|
||
append_menu_end() {
|
||
append_menu "[end]"
|
||
echo >> ${FILENAME}
|
||
}
|
||
|
||
menu_entry() {
|
||
append "[exec] ("`grep -v GenericName $* | grep Name= | cut -d = -f 2`") \
|
||
{"`grep -v TryExec $* | grep Exec= | cut -d = -f 2`"}"
|
||
}
|
||
|
||
menu_entry_dircheck() {
|
||
if [ -d "$*" ]; then
|
||
menu_entry_dir "$*"
|
||
fi
|
||
}
|
||
|
||
menu_entry_dir() {
|
||
for b in `ls "$*"/*.desktop 2>/dev/null `; do
|
||
menu_entry "${b}"
|
||
done
|
||
}
|
||
|
||
normal_find() {
|
||
while [ $1 ]; do
|
||
find_it $1 append "[exec] ($1) {$1}"
|
||
shift
|
||
done
|
||
}
|
||
|
||
|
||
# Get options.
|
||
while getopts ":khagt:p:n:q:o:m:" COMMAND_LINE_ARGUMENT ; do
|
||
case "${COMMAND_LINE_ARGUMENT}" in
|
||
k) KDEMENU=yes ;;
|
||
g) GNOMEMENU=yes ;;
|
||
t) MY_TERM=${OPTARG};;
|
||
o) FILENAME=${OPTARG} ;;
|
||
p) PKGDATADIR=${OPTARG} ;;
|
||
n) GPKGDATADIR=${OPTARG} ;;
|
||
q) KPKGDATADIR=${OPTARG} ;;
|
||
m) MENUTITLE=${OPTARG} ;;
|
||
h) display_usage ; exit 0 ;;
|
||
a) display_authors ; exit 0 ;;
|
||
*) display_help ; exit 1 ;;
|
||
esac
|
||
done
|
||
|
||
|
||
# Set Defaults
|
||
|
||
# menufile name
|
||
if [ -z ${FILENAME} ]; then
|
||
FILENAME=${HOME}/.fluxbox/menu
|
||
fi
|
||
|
||
# Can we actually create ${FILENAME}
|
||
if ! touch ${FILENAME}; then
|
||
echo "Fatal error: can't create $FILENAME" >/dev/stderr
|
||
exit 1
|
||
fi
|
||
|
||
# backup menu
|
||
if [ -w ${FILENAME} ]; then
|
||
mv ${FILENAME} ${FILENAME}.bak
|
||
fi
|
||
|
||
#packagedatadir
|
||
if [ ! -d "${PKGDATADIR}" ]; then
|
||
PKGDATADIR=/usr/share
|
||
fi
|
||
|
||
#gnome packagedatadir
|
||
if [ ! -d "${GPKGDATADIR}" ]; then
|
||
GPKGDATADIR=${PKGDATADIR}
|
||
fi
|
||
|
||
#kde packagedatadir
|
||
if [ ! -d "${KPKGDATADIR}" ]; then
|
||
KPKGDATADIR=${PKGDATADIR}
|
||
fi
|
||
|
||
# menutitle
|
||
if [ -z "${MENUTITLE}" ]; then
|
||
MENUTITLE="Fluxbox"
|
||
fi
|
||
|
||
# find the default terminal
|
||
find_it $MY_TERM
|
||
if [ $? -ne 0 ];then
|
||
[ -n "$MY_TERM" ] && echo "Warning: you choose an invalid term." > /dev/stderr
|
||
#The precise order is up for debate.
|
||
for term in Eterm aterm rxvt wterm xterm konsole gnome-terminal; do
|
||
if find_it $term; then
|
||
DEFAULT_TERM=$term
|
||
break
|
||
fi
|
||
done
|
||
else
|
||
DEFAULT_TERM=$MY_TERM
|
||
fi
|
||
|
||
|
||
|
||
# a unix system without any terms. that's odd
|
||
if [ -z "$DEFAULT_TERM" ];then
|
||
cat <<EOF>/dev/stderr
|
||
Error: I can't find any terminal-emulators in your path.
|
||
Please specify your favourite terminal with the -t option.
|
||
EOF
|
||
exit 1
|
||
fi
|
||
|
||
|
||
# menu defaults (if translation forget to set one of them)
|
||
BROWSERMENU="Browsers"
|
||
CONFIGUREMENU="Configure"
|
||
EDITORMENU="Editors"
|
||
EXITITEM="Exit"
|
||
FBSETTINGSMENU="FB-Settings"
|
||
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"
|
||
STYLEMENU="Styles"
|
||
STYLEMENUTITLE="Choose a style..."
|
||
TERMINALMENU="Terminals"
|
||
WORKSPACEMENU="Workspace List"
|
||
XUTILSMENU="X-utils"
|
||
|
||
# Check translation
|
||
case ${LC_ALL} in
|
||
ru_RU) #Russian locales
|
||
#OFFICEMENU="Office"
|
||
BROWSERMENU="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||
CONFIGUREMENU="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||
EDITORMENU="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||
EXITITEM="<22><><EFBFBD><EFBFBD><EFBFBD>"
|
||
FBSETTINGSMENU="FB-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||
GNOMEMENUTEXT="Gnome-<2D><><EFBFBD><EFBFBD>"
|
||
GRAPHICMENU="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||
KDEMENUTEXT="KDE-<2D><><EFBFBD><EFBFBD>"
|
||
MISCMENU="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||
MUSICMENU="<22><><EFBFBD><EFBFBD>"
|
||
NETMENU="<22><><EFBFBD><EFBFBD>"
|
||
RELOADITEM="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||
RESTARTITEM="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||
STYLEMENU="<22><><EFBFBD><EFBFBD><EFBFBD>"
|
||
STYLEMENUTITLE="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>"
|
||
TERMINALMENU="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||
WORKSPACEMENU="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||
XUTILSMENU="X-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||
;;
|
||
sv_SE) #Swedish locales
|
||
#OFFICEMENU="Office"
|
||
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"
|
||
STYLEMENU="Stiler"
|
||
STYLEMENUTITLE="V<>lj en stil"
|
||
TERMINALMENU="Terminaler"
|
||
WORKSPACEMENU="Arbetsytor"
|
||
XUTILSMENU="X-program"
|
||
;;
|
||
nl_NL) #Nederlandse locales
|
||
#OFFICEMENU="Office"
|
||
BROWSERMENU="Browsers"
|
||
CONFIGUREMENU="Instellingen"
|
||
EDITORMENU="Editors"
|
||
EXITITEM="Afsluiten"
|
||
FBSETTINGSMENU="FB-Instellingen"
|
||
GNOMEMENUTEXT="Gnome-menu"
|
||
GRAPHICMENU="Grafisch"
|
||
KDEMENUTEXT="KDE-menu"
|
||
MISCMENU="Onregelmatig"
|
||
MUSICMENU="Muziek"
|
||
NETMENU="Net"
|
||
RELOADITEM="Vernieuwen"
|
||
RESTARTITEM="Restart"
|
||
STYLEMENU="Stylen"
|
||
STYLEMENUTITLE="Kies een styl..."
|
||
TERMINALMENU="Terminals"
|
||
WORKSPACEMENU="Werkveld Lijst"
|
||
XUTILSMENU="X-utils"
|
||
;;
|
||
fi_FI) #Finnish locales
|
||
#OFFICEMENU="Office"
|
||
BROWSERMENU="Selaimet"
|
||
CONFIGUREMENU="Konfigurointi"
|
||
EDITORMENU="Editorit"
|
||
EXITITEM="Lopeta"
|
||
FBSETTINGSMENU="FB:n Asetukset"
|
||
GNOMEMENUTEXT="Gnomen valikot"
|
||
GRAPHICMENU="Grafiikka"
|
||
KDEMENUTEXT="KDE:n valikot"
|
||
MISCMENU="Sekalaista"
|
||
MUSICMENU="Musikki"
|
||
NETMENU="Verkko"
|
||
RELOADITEM="P<>ivit<69>"
|
||
RESTARTITEM="K<>ynnist<73> uudelleen"
|
||
STYLEMENU="Tyylit"
|
||
STYLEMENUTITLE="Valitse tyyli"
|
||
TERMINALMENU="Terminaalit"
|
||
WORKSPACEMENU="Ty<54>aluet"
|
||
XUTILSMENU="X-Ohjelmat"
|
||
;;
|
||
ja_JP) #Japanese locales
|
||
#OFFICEMENU="Office"
|
||
BROWSERMENU="<22>֥饦<D6A5><E9A5A6>"
|
||
CONFIGUREMENU="<22><><EFBFBD><EFBFBD>"
|
||
EDITORMENU="<22><><EFBFBD>ǥ<EFBFBD><C7A5><EFBFBD>"
|
||
EXITITEM="<22><>λ"
|
||
FBSETTINGSMENU="Fluxbox<6F><78><EFBFBD><EFBFBD>"
|
||
GNOMEMENUTEXT="Gnome<6D><65><EFBFBD>˥塼"
|
||
GRAPHICMENU="<22><><EFBFBD><EFBFBD>"
|
||
KDEMENUTEXT="KDE<44><45><EFBFBD>˥塼"
|
||
MISCMENU="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||
MUSICMENU="<22><><EFBFBD><EFBFBD>"
|
||
NETMENU="<22>ͥåȥ<C8A5><EFA1BC>"
|
||
RELOADITEM="<22><><EFBFBD>ɤ߹<C9A4><DFB9><EFBFBD>"
|
||
RESTARTITEM="<22>Ƶ<EFBFBD>ư"
|
||
STYLEMENU="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||
STYLEMENUTITLE="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>..."
|
||
TERMINALMENU="<22><><EFBFBD><EFBFBD><EFBFBD>ߥʥ<DFA5>"
|
||
WORKSPACEMENU="<22><EFBFBD><EFA1BC><EFBFBD><EFBFBD><EFBFBD>ڡ<EFBFBD><DAA1><EFBFBD>"
|
||
XUTILSMENU="X<>桼<EFBFBD>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD>ƥ<EFBFBD>"
|
||
;;
|
||
fr_FR) # french locales
|
||
#OFFICEMENU="Office"
|
||
BROWSERMENU="Navigateurs"
|
||
CONFIGUREMENU="Configurer"
|
||
EDITORMENU="Editeurs"
|
||
EXITITEM="Sortir"
|
||
FBSETTINGSMENU="FB-Settings"
|
||
GNOMEMENUTEXT="menus-Gnome"
|
||
GRAPHICMENU="Graphisme"
|
||
KDEMENUTEXT="menus-KDE"
|
||
MISCMENU="Misc"
|
||
MUSICMENU="Musique"
|
||
NETMENU="Net"
|
||
RELOADITEM="Recharger config"
|
||
RESTARTITEM="Red<65>marrer"
|
||
STYLEMENU="Styles"
|
||
STYLEMENUTITLE="Choisir un style..."
|
||
TERMINALMENU="Terminaux"
|
||
WORKSPACEMENU="Liste des bureaux"
|
||
XUTILSMENU="X-utils"
|
||
;;
|
||
it_IT|it_IT@euro) # italian locales
|
||
#OFFICEMENU="Office"
|
||
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"
|
||
STYLEMENU="Scegli uno stile..."
|
||
STYLEMENUTITLE="Scegli uno stile..."
|
||
TERMINALMENU="Terminali"
|
||
WORKSPACEMENU="Aree di lavoro"
|
||
XUTILSMENU="X-utils"
|
||
;;
|
||
*)
|
||
;;
|
||
esac
|
||
|
||
# Start of menu
|
||
|
||
echo "[begin] (${MENUTITLE})" > ${FILENAME}
|
||
|
||
|
||
append "[exec] (${DEFAULT_TERM}) {${DEFAULT_TERM}}"
|
||
find_it nedit append "[exec] (nedit) {nedit}"
|
||
|
||
|
||
append_submenu ${TERMINALMENU}
|
||
normal_find xterm gnome-terminal Eterm konsole aterm rxvt
|
||
append_menu_end
|
||
|
||
|
||
append_submenu ${EDITORMENU}
|
||
normal_find nedit gvim xemacs emacs gedit xedit kword kwrite kate
|
||
append_menu_end
|
||
|
||
|
||
append_submenu ${BROWSERMENU}
|
||
normal_find netscape galeon mozilla dillo
|
||
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 fluxbox.org}"
|
||
find_it w3m append "[exec] (w3m) {${DEFAULT_TERM} -e w3m fluxbox.org}"
|
||
find_it lynx append "[exec] (lynx) {${DEFAULT_TERM} -e lynx fluxbox.org}"
|
||
append_menu_end
|
||
|
||
|
||
append_submenu ${NETMENU}
|
||
normal_find realplay gaim sylpheed kmail gnomemeeting evolution gftp pan xchat kopete
|
||
find_it licq append "[exec] (licq) {env QT_XFT=true licq}"
|
||
find_it mutt append "[exec] (mutt) {${DEFAULT_TERM} -e mutt}"
|
||
find_it irssi append "[exec] (irssi) {${DEFAULT_TERM} -e irssi}"
|
||
find_it BitchX append "[exec] (BitchX) {${DEFAULT_TERM} -e BitchX -N}"
|
||
[ $? -ne 0 ] && \
|
||
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 ${MULTIMEDIAMENU}
|
||
append_submenu ${GRAPHICMENU}
|
||
normal_find gimp xv gqview xpaint kpaint kiconedit xscreensaver-demo
|
||
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 gqmpeg xmixer gmix kmix grecord \
|
||
kmidi xplaycd soundtracker grip
|
||
find_it cplay append "[exec] (cplay) {${DEFAULT_TERM} -e cplay}"
|
||
append_menu_end
|
||
|
||
append_submenu ${GAMESMENU}
|
||
normal_find bzflag gnibbles gnobots2 tuxpuck gataxx glines \
|
||
gnect mahjongg gnomine gnome-stones gnometris gnotravex \
|
||
gnotski iagno knights same-gnome xboard freecell pysol \
|
||
gtali tuxracer xpenguins xsnow xeyes xpenguins
|
||
append_menu_end
|
||
|
||
append_submenu ${MISCMENU}
|
||
normal_find xine aviplay gtv gmplayer xmovie xcdroast xgdb ddd
|
||
find_it dvdrip append "[exec] (dvdrip) {nohup dvdrip}"
|
||
append_menu_end
|
||
|
||
append_submenu ${XUTILSMENU}
|
||
normal_find xfontsel xman xload xfigxbiff editres viewres xclock
|
||
append_menu_end
|
||
append_menu_end
|
||
|
||
|
||
append_submenu ${OFFICEMENU}
|
||
normal_find xclock xcalc kcalc
|
||
find_it gcalc append "[exec] (gcalc) {gcalc}"
|
||
[ $? -ne 0 ] && \
|
||
find_it gnome-calculator append "[exec] (gcalc) {gnome-calculator}"
|
||
find_it ooffice append "[exec] (Open Office) {ooffice}"
|
||
find_it soffice append "[exec] (Star Office) {soffice}"
|
||
normal_find abiword kword wordperfect katoob acroread xpdf
|
||
append_menu_end
|
||
|
||
|
||
# gnome menu
|
||
if [ -d ${GPKGDATADIR}/gnome/apps -a "${GNOMEMENU}" ]; then
|
||
append_submenu ${GNOMEMENUTEXT}
|
||
for a in `ls ${GPKGDATADIR}/gnome/apps`; do
|
||
if [ -d ${GPKGDATADIR}/gnome/apps/"${a}" ] ; then
|
||
append_submenu "${a}"
|
||
menu_entry_dir "${GPKGDATADIR}/gnome/apps/${a}"
|
||
menu_entry_dircheck "/etc/X11/applnk/${a}"
|
||
append_menu_end
|
||
fi
|
||
done
|
||
append_menu_end
|
||
fi
|
||
|
||
# kde submenu
|
||
if [ -d ${KPKGDATADIR}/applnk/ -a "${KDEMENU}" ]; then
|
||
append_submenu ${KDEMENUTEXT}
|
||
for a in `ls ${KPKGDATADIR}/applnk/`; do
|
||
if [ -d ${KPKGDATADIR}/applnk/"${a}" ]; then
|
||
append_submenu "${a}"
|
||
for x in `ls ${KPKGDATADIR}/applnk/"${a}"`; do
|
||
if [ -d ${KPKGDATADIR}/applnk/"${a}"/"${x}" ]; then
|
||
append_submenu "${x}"
|
||
menu_entry_dir ${KPKGDATADIR}/applnk/"${a}"/"${x}"
|
||
append_menu_end
|
||
fi
|
||
done
|
||
menu_entry_dir ${KPKGDATADIR}/applnk/"${a}"
|
||
append_menu_end
|
||
fi
|
||
done
|
||
menu_entry_dir ${KPKGDATADIR}/applnk/
|
||
append_menu_end
|
||
fi
|
||
|
||
append_submenu ${FBSETTINGSMENU}
|
||
append "[workspaces] (${WORKSPACEMENU})"
|
||
|
||
append_menu "[submenu] (${STYLEMENU}) {${STYLEMENUTITLE}}"
|
||
append "[stylesdir] (~/.fluxbox/styles)"
|
||
append "[stylesdir] (${PKGDATADIR}/fluxbox/styles)"
|
||
append_menu_end
|
||
|
||
append "[config] (${CONFIGUREMENU})"
|
||
append "[reconfig] (${RELOADITEM})"
|
||
|
||
find_it fluxconf append "[exec] (Fluxconf) {fluxconf}"
|
||
|
||
# if gxmessage exitst use it; else use xmessage
|
||
find_it gxmessage append "[exec] (Windowname) {xprop|grep WM_CLASS|cut -d \\\" -f 2|gxmessage -file - -center}"
|
||
[ $? -ne 0 ] && \
|
||
find_it xmessage append "[exec] (Windowname) {xprop|grep WM_CLASS|cut -d \\\" -f 2|xmessage -file - -center}"
|
||
append_menu_end
|
||
|
||
|
||
append "[restart] (${RESTARTITEM})"
|
||
append "[exit] (${EXITITEM})"
|
||
|
||
append_menu_end
|