Skip to content

Instantly share code, notes, and snippets.

@dariooddenino
Created January 27, 2016 08:56
Show Gist options
  • Save dariooddenino/1f42c6c4026e17228dd5 to your computer and use it in GitHub Desktop.
Save dariooddenino/1f42c6c4026e17228dd5 to your computer and use it in GitHub Desktop.
Dell 9350 Touchpad toggle on Ubuntu
#!/bin/bash
declare -i ID
ID=`xinput list | grep -Eo 'DLL0704:01\s06CB:76AE\sUNKNOWN\s*id\=[0-9]{1,2}' | grep -Eo '\=[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 disable $ID
echo "Touchpad disabled."
else
xinput enable $ID
echo "Touchpad enabled."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment