Advertisement
zinch

Disable Touchpad

Mar 15th, 2016
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.32 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. SAVED_IFS=$IFS
  4. IFS=$(echo -en "\n\b")
  5.  
  6. TOUCHPAD='ETPS/2 Elantech Touchpad'
  7.  
  8. for line in $(xinput list)
  9. do
  10.     if [[ "${line}" =~ "$TOUCHPAD" ]]
  11.     then
  12.         device_id=$(echo "${line#*id=}" | cut -f 1)
  13.         xinput set-prop $device_id "Device Enabled" 0
  14.     fi
  15. done
  16.  
  17. IFS=$SAVED_IFS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement