diff options
Diffstat (limited to '.scripts')
-rwxr-xr-x | .scripts/toggle_touchpad.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/.scripts/toggle_touchpad.sh b/.scripts/toggle_touchpad.sh new file mode 100755 index 0000000..aca2d56 --- /dev/null +++ b/.scripts/toggle_touchpad.sh @@ -0,0 +1,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)) |