I'm new to linux so please keep that in mind. I'm trying to make a bash script to enable/disable my touchpad. I found some but they aren't working on my system, so I'm trying to modify to my them work on my machine. I know "synclient touchpadoff=1" will disable the touchpad( but not click for some reason), and of course "=0" will enable it. My bash script will work fine, turn on touchpad and return touchpad on message, but try to disable and it still enable touchpad and return touchpad on. What am I doing wrong.
My script:
#!/bin/bash
#Toggle touchpad on/off with keyboard input
echo "Do you want touchpad on?"
echo "Answer y or n"
read answer
if answer=y
then synclient touchpadoff=0
echo "touchpad on"
else
synclient touchpadoff=1
echo "touchpad off"
fi
My only other option would be to mod the start up to disable at boot, then keyboard shortcut to terminal and enable touchpad if mouse fails or not available. The ultimate goal is to make a keyboard shortcut with onscreen output showing touchpad on or off, but thats a project for another day. Any help would be GREATLY appreciated. Thanks
Bookmarks