Last active
September 16, 2016 03:09
-
-
Save Tutorgaming/dfd2a87d3eeef600d14ba1bac872e0d8 to your computer and use it in GitHub Desktop.
Touchpad On Off Script for DELL 5368 // RUN THE SCRIPT IN KEYBOARD (SETTING) -> shortcuts (Must define button manually)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
declare -i ID | |
ID=` xinput list | grep -Eo 'Touchpad \s*id=[0-9]{1,2}'| grep -Eo '[0-9]{1,2}' ` | |
declare -i STATE | |
STATE=`xinput list-props $ID|grep 'Device Enabled'|awk '{print $4}'` | |
if [ $STATE -eq 1 ] | |
then | |
xinput set-prop $ID "Device Enabled" 0 | |
echo "Touchpad disabled." | |
else | |
xinput set-prop $ID "Device Enabled" 1 | |
echo "Touchpad enabled." | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment