summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authormathias <mathias>2005-01-05 05:57:12 (GMT)
committermathias <mathias>2005-01-05 05:57:12 (GMT)
commita795d9612c44e675726e560d4a33ccb890606f86 (patch)
tree8cef73cd308131fbeeeac342effbd7695ce89768 /util
parent83224b7f55c9fd1febb89171d311da95f323eae4 (diff)
downloadfluxbox_lack-a795d9612c44e675726e560d4a33ccb890606f86.zip
fluxbox_lack-a795d9612c44e675726e560d4a33ccb890606f86.tar.bz2
added imlib2-check so fbgm would prefer *.png over *.xpm when trying to find
icons
Diffstat (limited to 'util')
-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}