summaryrefslogtreecommitdiffstats
path: root/toggle-mouse-wheel-emulation
blob: 88fffe926bd67501dca6ae9f66e930a470b62c01 (plain)
1
2
3
4
5
6
7
8
9
10
11
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