I think that for some reason the alias TT is not defined
Code:
alias TT='touchpad-toggle'
Either your ~/.bashrc file does not contain that line, or never executes it or is not executed at all. Are you running another shell, not bash but for example csh or tcsh?
What happens if you type the long function name (launch the command with the Enter key)
-o-
It is also possible to make a shell-script of touchpad-toggle (instead of a function in .bashrc).
Code:
#!/bin/bash
# toggle synaptic touchpad on/off
# get current state
SYNSTATE=$(synclient -l | grep TouchpadOff | awk '{ print $3 }')
# change to other state
if [ $SYNSTATE = 0 ]; then
synclient touchpadoff=1
echo "touchpad OFF"
elif [ $SYNSTATE = 1 ]; then
synclient touchpadoff=0
echo "touchpad ON"
else
echo "Couldn't get touchpad status from synclient"
exit 1
fi
Create an own bin directory
Code:
cd
mkdir bin
cd bin
leafpad TT
Put this toggle code above (starting with #!/bin/bash) into an editor (leafpad) and write it to a file named whatever you prefer, for example TT or touchpad-toggle.
Make the file executable
(if TT is the name you selected)
Otherwise you can make two super simple scripts ttoff (touchpad off) and tton (touchpad on)
Code:
echo synclient touchpadoff=1 > ttoff
Code:
echo synclient touchpadoff=0 > tton
and keep them in you bin directory.
And then you can run
ttoff to turn the touchpad off
and
tton to turn the touchpad on.
Bookmarks