all repos — dotfiles @ 0e853adff071b25cd89a42cb38a9a6e553e8163b

linux dotfiles

update scripts/toggle_touchpad
prithugoswami prithugoswami524@gmail.com
Tue, 19 Jun 2018 11:22:00 +0530
commit

0e853adff071b25cd89a42cb38a9a6e553e8163b

parent

4773a698d2c3c747d78c309c46745c1c57ef13ef

1 files changed, 4 insertions(+), 4 deletions(-)

jump to
M scripts/toggle_touchpad.shscripts/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