Created
August 10, 2022 14:30
-
-
Save hoangdh/4579a6ae234a4df3054c7169e236d630 to your computer and use it in GitHub Desktop.
Switch Enable/Disable touchpad on Ubuntu
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 | |
if [ "$1" == "on" ] | |
then | |
synclient TouchpadOff=0 | |
echo "$(date '+%F %T') - INFO: Touchpad is enabled." | |
elif [ "$1" == "off" ] | |
then | |
echo "$(date '+%F %T') - INFO: Touchpad is disabled." | |
synclient TouchpadOff=1 | |
else | |
echo -e "$(date '+%F %T') - ERROR: Invaild command\nUsage: $0 on/off" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment