Skip to content

Instantly share code, notes, and snippets.

@ninetails
Last active December 15, 2016 18:16
Show Gist options
  • Select an option

  • Save ninetails/ed3b7150bf8ba76e990ebd56e2df6d4d to your computer and use it in GitHub Desktop.

Select an option

Save ninetails/ed3b7150bf8ba76e990ebd56e2df6d4d to your computer and use it in GitHub Desktop.
Disable touchpad on Dell Inspiron 15 5000 (P55F)
#!/bin/bash
declare -i ID
ID=`xinput list | grep -v 'Synaptics' | grep -Eio '(touchpad|glidepoint)\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 disable $ID
#echo "Touchpad disabled."
#notify-send 'Touchpad' 'Disabled' -i /usr/share/icons/Adwaita/48x48/devices/input-touchpad.png
else
xinput enable $ID
#echo "Touchpad enabled."
#notify-send 'Touchpad' 'Enabled' -i /usr/share/icons/Adwaita/48x48/devices/input-touchpad.png
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment