b5b33afcd7
Signed-off-by: Marko Korhonen <marko.korhonen@reekynet.com>
26 lines
592 B
Bash
Executable file
26 lines
592 B
Bash
Executable file
#!/bin/sh
|
|
|
|
|
|
gr="FocalTechPS/2 FocalTech Touchpad"
|
|
#gr="SynPS/2 Synaptics TouchPad"
|
|
|
|
|
|
#Creates a file if it does not exist to store the 0 or 1 bit to check if touchpad is enabled or disabled. Set to 0 by default
|
|
if [ ! -f .touchpad ];
|
|
then
|
|
echo 0 > .touchpad;
|
|
|
|
fi
|
|
|
|
if grep -q 0 ".touchpad";
|
|
then
|
|
xinput enable "$gr";
|
|
echo 1 > .touchpad;
|
|
echo "Touchpad enabled"
|
|
notify-send "Touchpad enabled"
|
|
else
|
|
xinput disable "$gr";
|
|
echo 0 > .touchpad;
|
|
echo "Touchpad Disabled"
|
|
notify-send "Touchpad disabled"
|
|
fi
|