Skip to content

Instantly share code, notes, and snippets.

@Tutorgaming
Last active September 16, 2016 03:09
Show Gist options
  • Save Tutorgaming/dfd2a87d3eeef600d14ba1bac872e0d8 to your computer and use it in GitHub Desktop.
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)
#!/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