/etc/acpi/asus-touchpad.sh is in acpi-support 0.140.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | #!/bin/sh
[ -f /usr/share/acpi-support/state-funcs ] || exit 0
. /usr/share/acpi-support/power-funcs
getXconsole
getTouchDeviceId()
{
# extract the device id for the supplied touch device name
xinput list | sed -nr "s|.*$1.*id=([0-9]+).*|\1|p"
}
ENABLEPROP="Synaptics Off"
# Get the xinput device number and enabling property for the touchpad
XINPUTNUM=$(getTouchDeviceId "SynPS/2 Synaptics TouchPad")
if [ -z "$XINPUTNUM" ]; then
XINPUTNUM=$(getTouchDeviceId "PS/2 Elantech Touchpad")
ENABLEPROP="Device Enabled"
fi
# if we failed to get an input, exit
[ -z "$XINPUTNUM" ] && exit 1
# get the current state of the touchpad
TPSTATUS=$(xinput list-props $XINPUTNUM | awk "/$ENABLEPROP/ { print \$NF }")
# if getting the status failed, exit
[ -z "$TPSTATUS" ] && exit 1
if [ $TPSTATUS = 0 ]; then
xinput set-int-prop $XINPUTNUM "$ENABLEPROP" 8 1
else
xinput set-int-prop $XINPUTNUM "$ENABLEPROP" 8 0
fi
|