I just started using bash recently and I'm having troubles with a simple command. Here's the script:
#!/bin/bash
if TouchpadOff=0; then
synclient TouchpadOff=1
echo "Touchpad has been turned off"
else
synclient TouchpadOff=0
echo "Touchpad has been turned on"
fi
Basically, what I'm trying to do is toggle the pad to turn off or on depending on whether it is currently on or off. When the pad is on, running the script turns it off, which is what I want it to do.
But for some reason, when I run it again to turn the pad on, it is still turned off and still echos "Touchpad has been turned off", even when I want it to turn on. I hope someone can help me with my question. Thanks!
echo "..."
withnotify-send "..."
. – pa4080 Aug 31 '18 at 10:31