Skip to content

Instantly share code, notes, and snippets.

@hoangdh
Created August 10, 2022 14:30
Show Gist options
  • Save hoangdh/4579a6ae234a4df3054c7169e236d630 to your computer and use it in GitHub Desktop.
Save hoangdh/4579a6ae234a4df3054c7169e236d630 to your computer and use it in GitHub Desktop.
Switch Enable/Disable touchpad on Ubuntu
#!/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