summaryrefslogtreecommitdiff
path: root/bin/midori-display
diff options
context:
space:
mode:
Diffstat (limited to 'bin/midori-display')
-rwxr-xr-xbin/midori-display10
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/midori-display b/bin/midori-display
index afb34c0..5949686 100755
--- a/bin/midori-display
+++ b/bin/midori-display
@@ -127,9 +127,13 @@ fi
sanitized_pointer_button_map=$(echo ${POINTER_BUTTON_MAP//[^0-9\ ]/} | sed -e 's/^\s*//' -e 's/\s*$//')
count_buttons_pointer_button_map=$(echo -n "${sanitized_pointer_button_map//[0-9]/}"| wc -m)
-if [ "x$POINTER_BUTTON_MAP" = "x$sanitized_pointer_button_map" ] && \
- [ $count_buttons_pointer_button_map -lt 32 ]; then
- xmodmap -e "pointer = $POINTER_BUTTON_MAP"
+if which xmodmap 1>/dev/null; then
+ if [ -n "$POINTER_BUTTON_MAP" ] && [ "x$POINTER_BUTTON_MAP" = "x$sanitized_pointer_button_map" ] && \
+ [ $count_buttons_pointer_button_map -lt 32 ]; then
+ xmodmap -e "pointer = $POINTER_BUTTON_MAP"
+ fi
+else
+ $OUTPUT "WARNING: Cannot strip down mouse/pointer button functionality. Make sure 'xmodmap' is installed."
fi
# if FAKE_HOSTNAME is not empty, use that string for hostname