input: use an arithmetic expression for better documentation

This commit is contained in:
Vincent Bernat 2015-01-01 22:03:44 +01:00
parent 27599fedcc
commit 942d758731

View file

@ -51,7 +51,17 @@ case "$use,$(uname -n),$name" in
# The following is 60% 0 0 0 40% 60% 0 0 # The following is 60% 0 0 0 40% 60% 0 0
# The logic is explained here: # The logic is explained here:
# http://who-t.blogspot.de/2013/12/lenovo-t440-touchpad-button.html # http://who-t.blogspot.de/2013/12/lenovo-t440-touchpad-button.html
xinput set-prop $device 'Synaptics Soft Button Areas' 3656 0 0 0 2928 3656 0 0 xstart=1472
xend=5112
xinput set-prop $device 'Synaptics Soft Button Areas' \
$(( ($xend - $xstart) * 60 / 100 + $xstart )) \
0 \
0 \
0 \
$(( ($xend - $xstart) * 40 / 100 + $xstart )) \
$(( ($xend - $xstart) * 60 / 100 + $xstart )) \
0 \
0
xinput set-prop $device 'Synaptics Off' 1 xinput set-prop $device 'Synaptics Off' 1
;; ;;
XISlavePointer,zoro,"ELAN Touchscreen") XISlavePointer,zoro,"ELAN Touchscreen")