blob: 6bf2c59c95b7cbc0084368e034cdfda1db83c3c7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/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
|