Check for xwininfo before using it

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Uli Schlachter 2010-04-25 17:43:29 +02:00 committed by Julien Danjou
parent 6cb7d27860
commit 4e92699cb0
1 changed files with 21 additions and 9 deletions

View File

@ -144,6 +144,7 @@ debugawsetbg() {
echo echo
echo $debugstory echo $debugstory
echo $sad_esetroot_story echo $sad_esetroot_story
echo $sad_display_story
exit 0 exit 0
} }
@ -320,15 +321,26 @@ if [ "$setterfromcommandline" != true ]; then
fi fi
for wpsetter in $wpsetters; do for wpsetter in $wpsetters; do
if find_it $wpsetter; then if find_it $wpsetter; then
if [ ! "$wpsetter" = Esetroot ]; then case $wpsetter in
WPSETTER=$wpsetter Esetroot)
break if ldd `which Esetroot`|grep libImlib 2>&1 > /dev/null; then
elif ldd `which Esetroot`|grep libImlib 2>&1 > /dev/null; then
WPSETTER=$wpsetter WPSETTER=$wpsetter
break break
else else
sad_esetroot_story="I also found Esetroot, but it doesn't have support for setting wallpapers. You need to install libimlib2 and rebuild Eterm to get it working." sad_esetroot_story="I also found Esetroot, but it doesn't have support for setting wallpapers. You need to install libimlib2 and rebuild Eterm to get it working."
fi fi
;;
display)
if find_it xwininfo; then
WPSETTER=$wpsetter
break
else
sad_display_story="I also found display, but I need xwininfo for querying the root window geometry."
fi
;;
*)
WPSETTER=$wpsetter
esac
fi fi
done done
fi fi