#!/bin/sh # Turn off/on touchpad when lid is closed/open # Guess the touchpad name touch_name=$(DISPLAY=:0 xinput list --name-only | grep -i touchpad) case "$3" in close) DISPLAY=:0 xinput set-prop "$touch_name" "Device Enabled" 0 && logger "Touchpad disabled" ;; open) DISPLAY=:0 xinput set-prop "$touch_name" "Device Enabled" 1 && logger "Touchpad enabled" ;; *) logger "ACPI action undefined: $3" ;; esac