Fix toggle_touchpad to support synaptics touchpad on current ubuntu

This commit is contained in:
TKE
2020-12-18 10:10:45 +01:00
parent 2b736470a0
commit c6f3d2e0c0

View File

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