aboutsummaryrefslogtreecommitdiff
path: root/util/fluxbox-generate_menu.in
diff options
context:
space:
mode:
Diffstat (limited to 'util/fluxbox-generate_menu.in')
-rwxr-xr-xutil/fluxbox-generate_menu.in23
1 files changed, 20 insertions, 3 deletions
diff --git a/util/fluxbox-generate_menu.in b/util/fluxbox-generate_menu.in
index 24f8627..7322061 100755
--- a/util/fluxbox-generate_menu.in
+++ b/util/fluxbox-generate_menu.in
@@ -47,6 +47,13 @@
47WHOAMI=`whoami` 47WHOAMI=`whoami`
48[ "$WHOAMI" = root ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin 48[ "$WHOAMI" = root ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin
49 49
50# Check for Imlib2-support
51if ( fluxbox -info 2> /dev/null | grep -- -IMLIB ); then
52 PNG_ICONS="no"
53else
54 PNG_ICONS="yes"
55fi
56
50# Functions 57# Functions
51display_usage() { 58display_usage() {
52 cat << EOF 59 cat << EOF
@@ -146,10 +153,20 @@ append() {
146 if [ -z "${INSTALL}" ]; then 153 if [ -z "${INSTALL}" ]; then
147 echo -n " $*" >> ${MENUFILENAME} 154 echo -n " $*" >> ${MENUFILENAME}
148 execname="`echo $*|cut -d\( -f2|cut -d\) -f1`" 155 execname="`echo $*|cut -d\( -f2|cut -d\) -f1`"
149 if [ -r "${HOME}/.fluxbox/icons/$execname.xpm" ]; then 156 if [ "${PNG_ICONS}" = "no" ]; then
150 echo "<${HOME}/.fluxbox/icons/$execname.xpm>" >> ${MENUFILENAME} 157 if [ -r "${HOME}/.fluxbox/icons/$execname.xpm" ]; then
158 echo "<${HOME}/.fluxbox/icons/$execname.xpm>" >> ${MENUFILENAME}
159 else
160 echo >> ${MENUFILENAME}
161 fi
151 else 162 else
152 echo >> ${MENUFILENAME} 163 if [ -r "${HOME}/.fluxbox/icons/$execname.png" ]; then
164 echo "<${HOME}/.fluxbox/icons/$execname.png>" >> ${MENUFILENAME}
165 elif [ -r "${HOME}/.fluxbox/icons/$execname.xpm" ]; then
166 echo "<${HOME}/.fluxbox/icons/$execname.xpm>" >> ${MENUFILENAME}
167 else
168 echo >> ${MENUFILENAME}
169 fi
153 fi 170 fi
154 else 171 else
155 echo " $*" >> ${MENUFILENAME} 172 echo " $*" >> ${MENUFILENAME}