update scripts/toggle_touchpad
prithugoswami prithugoswami524@gmail.com
Tue, 19 Jun 2018 11:22:00 +0530
1 files changed,
4 insertions(+),
4 deletions(-)
jump to
M
scripts/toggle_touchpad.sh
→
scripts/toggle_touchpad.sh
@@ -1,10 +1,10 @@
#!/bin/sh -# device id=14 -touchpad="$(xinput list-props 14 | awk 'NR == 2 {print $4}')" +id=$(xinput | grep -i touchpad | grep -o "id=[0-9]*" | grep -o "[0-9]*") +touchpad="$(xinput list-props $id | awk 'NR == 2 {print $4}')" if [ "$touchpad" -eq 0 ]; then - xinput --enable 14 + xinput --enable $id else - xinput --disable 14 + xinput --disable $id fi