all repos — dotfiles @ c4f7807265dc2f6216f49fb83e053b0887f7ca27

linux dotfiles

bin/scripts/touchpad-conf (view raw)

 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