Advertisement
jv2112

HP-Envy-Toggle-Touchpad-Script

Apr 17th, 2016
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.44 KB | None | 0 0
  1. #! /bin/zsh
  2. # Toggle Mouse pad off
  3.  
  4. # xinput list --- List Devices
  5. # xinput set-prop 13 "Device Enabled" 0 --- Disable 0 , Enable 1
  6. #
  7. #SYNSTATE=$(xinput list-props 13 | grep Enabled | grep -Eo .)
  8. A=$(xinput | grep 'SynPS/2 Synaptics TouchPad' | cut -f2 | cut -c4,5)
  9.  
  10.  
  11. SYNSTATE=$(xinput list-props $A | grep '138' | cut -f3)
  12. if [ $SYNSTATE = 0 ]; then xinput set-prop $A "Device Enabled" 1
  13. else xinput set-prop $A "Device Enabled" 0; fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement