#!/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