Created
May 27, 2013 04:26
-
-
Save GeordieP/5655194 to your computer and use it in GitHub Desktop.
Toggle trackpad on Acer C7 ChromeBook running ChrUbuntu
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/bash | |
inputID=$(echo $(xinput --list | grep "cyapa" | cut -d'=' -f2) | cut -d\ -f1) | |
deviceStatus=$(echo $(xinput list-props $inputID | grep "Enabled" | rev) | cut -d\ -f1) | |
if [ $deviceStatus == 0 ]; then | |
echo -e "Trackpad is \e[0;31moff\e[0m, enabling..." | |
xinput set-prop $inputID "Device Enabled" 1 | |
echo -e "Trackpad \e[0;32menabled.\e[0m" | |
else | |
echo -e "Trackpad is \e[0;32mon\e[0m, disabling..." | |
xinput set-prop $inputID "Device Enabled" 0 | |
echo -e "Trackpad \e[0;31mdisabled.\e[0m" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment