Files
gists/toggle_touchpad
Tobias Kessels c96617dbce fixed bug in toggle_touchpad
toggle_touchpad was using a static id instead of the dynamic one
readme extended
2017-08-13 01:26:53 +02:00

8 lines
254 B
Bash
Executable File

#!/bin/bash
touchpad_id=$(xinput list | grep -i touch | grep -Po '(?<=id=)\d+')
if (xinput list-props ${touchpad_id} | grep "Device Enabled" | grep -Po '\d$' | grep -q "1"); then
xinput disable "${touchpad_id}"
else
xinput enable "${touchpad_id}"
fi