#!/bin/sh DEVICE="ImPS/2 Generic Wheel Mouse" devenabled=`xinput --list-props "$DEVICE" | grep "Device Enabled" | cut -d ":" -f2 | cut -f2` if [ $devenabled -eq 1 ] then xinput --set-prop "$DEVICE" "Device Enabled" 0 echo "Disabled touchpad" else xinput --set-prop "$DEVICE" "Device Enabled" 1 echo "Enabled touchpad" fi