summaryrefslogtreecommitdiffstats
path: root/toggle-mouse-wheel-emulation
diff options
context:
space:
mode:
authorSebastian Reichel <sre@ring0.de>2015-12-06 11:19:56 +0100
committerSebastian Reichel <sre@ring0.de>2015-12-06 11:19:56 +0100
commit7186dcad089c4d2d931c45a4e7b99a6fb9ff3ce0 (patch)
tree40a584fcf7daf45e9c1f31dbcb15d54963e5645e /toggle-mouse-wheel-emulation
downloadtp-key-handler-7186dcad089c4d2d931c45a4e7b99a6fb9ff3ce0.tar.bz2
initial commit
Diffstat (limited to 'toggle-mouse-wheel-emulation')
-rwxr-xr-xtoggle-mouse-wheel-emulation12
1 files changed, 12 insertions, 0 deletions
diff --git a/toggle-mouse-wheel-emulation b/toggle-mouse-wheel-emulation
new file mode 100755
index 0000000..88fffe9
--- /dev/null
+++ b/toggle-mouse-wheel-emulation
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+ID=$(xinput --list --id-only "PS/2 Synaptics TouchPad")
+ENABLED=$(xinput list-props $ID | grep -E "Evdev Wheel Emulation \([0-9]*\):" | awk '{print $5}')
+
+if [ $ENABLED = 1 ] ; then
+ xinput set-prop $ID --type=int --format=8 "Evdev Wheel Emulation" 0
+ echo "disabled"
+else
+ xinput set-prop $ID --type=int --format=8 "Evdev Wheel Emulation" 1
+ echo "enabled"
+fi