Advertisement
mfillpot

kill touchpad

Feb 17th, 2013
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.44 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # function to enable or disable the trackpad
  4.  
  5. DEV=`egrep -i 'synap|alps|etps' /proc/bus/input/devices|cut -d "\"" -f 2`
  6. STAT=`xinput list-props "$DEV"|grep "Device Enabled"|sed 's/\t//g'|cut -d ":" -f 2`
  7.  
  8.  
  9. case "${STAT}" in
  10.   0)
  11.     xinput --set-prop "${DEV}" "Device Enabled" 1
  12.     echo "Trackpad Enabled"|wall
  13.     ;;
  14.   1)
  15.     xinput --set-prop "${DEV}" "Device Enabled" 0
  16.     echo "Trackpad Disabled"|wall
  17.     ;;
  18.   esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement