all repos — dotfiles @ 0a55cd8663268a0bdb1d9044c28733921ab87885

linux dotfiles

bin/scripts/touchpad-conf

1 2 3 4 5 6 7 8 9 10 11 12
#!/usr/bin/bash
# very ugly, I know

id=$(xinput | grep -i touchpad | grep -o "id=[0-9]*" | grep -o "[0-9]*")
tapen=$(xinput list-props $id | grep "Tapping Enabled" |\
    awk 'NR==1 {print $(NF-1)}' | cut -d '(' -f 2 | cut -d ')' -f 1)
natscr=$(xinput list-props $id | grep "Natural Scrolling" |\
    awk 'NR==1 {print $(NF-1)}' | cut -d '(' -f 2 | cut -d ')' -f 1)

xinput set-prop $id $tapen 1
xinput set-prop $id $natscr 1