theniceboy/i3/tap-to-click.sh
2019-07-24 23:35:37 +08:00

11 lines
377 B
Bash
Executable file

#!/bin/bash
# Get id of touchpad and the id of the field corresponding to
# tapping to click
id=`xinput list | grep "Touchpad" | cut -d'=' -f2 | cut -d'[' -f1`
tap_to_click_id=`xinput list-props $id | \
grep "Tapping Enabled (" \
| cut -d'(' -f2 | cut -d')' -f1`
# Set the property to true
xinput --set-prop $id $tap_to_click_id 1