summaryrefslogtreecommitdiff
path: root/.scripts/toggle_touchpad.sh
blob: aca2d56ea511ba06c06e3d1317a21f5a771a2628 (plain)
1
2
3
4
5
6
7
8
9
#!/bin/bash

device_id=$(xinput list | sed -n "s/^.*Synaptics.*id=\([^\t]*\).*$/\\1/p")

enabled=$(xinput list-props $device_id | sed -n "s/^.*Device Enabled.*\t\(.*\)$/\\1/p")
property=$(xinput list-props $device_id | sed -n "s/^.*Device Enabled (\([^)]*\)).*$/\\1/p")


xinput set-prop $device_id $property $((1-enabled))