Skip to content

Instantly share code, notes, and snippets.

@armando-basile
Created June 22, 2015 21:46
Show Gist options
  • Save armando-basile/a1e5f958f92eb358123e to your computer and use it in GitHub Desktop.
Save armando-basile/a1e5f958f92eb358123e to your computer and use it in GitHub Desktop.
ASUS Touchpad disable/enable script (require xinput and gxmessage)
#!/bin/bash
CMD="gxmessage -borderless -ontop -title Information -center -timeout 3 "
IS_TOUCHPAD=`xinput list-props "FocalTechPS/2 FocalTech FocalTech Touchpad" | grep "Device Enabled (145): 1"`
# detect if is superuser
if [[ $EUID -ne 0 ]]
then
echo -e "This script must be run as rootn"
exit 1
fi
if [ "$IS_TOUCHPAD" == "" ]
then
# enable touchpad
xinput enable "FocalTechPS/2 FocalTech FocalTech Touchpad"
$CMD -fn "sans 30" Touchpad ENABLED
else
# disable touchpad
xinput disable "FocalTechPS/2 FocalTech FocalTech Touchpad"
$CMD -fn "sans 30" Touchpad DISABLED
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment