From e2a0cf2a79b43f9f86b74270f3d96fe300687804 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Sat, 20 Jan 2024 12:31:58 -0500 Subject: Cleanup unused files and code. --- x/touchpad-props | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 x/touchpad-props (limited to 'x/touchpad-props') diff --git a/x/touchpad-props b/x/touchpad-props new file mode 100755 index 0000000..0851486 --- /dev/null +++ b/x/touchpad-props @@ -0,0 +1,32 @@ +#!/bin/sh + +touchpads="$(xinput list --name-only | grep Touchpad)" + +proplist='Click Method Enabled::0 1 +Tapping Enabled::1 +Tapping Drag Enabled::1 +Tapping Button Mapping Enabled::1 0' + +IFS=' +' + +for device in $touchpads ; do + props=$(xinput --list-props "$device") + + for prop in $proplist ; do + propName="$(echo "$prop" | awk -F:: '{print $1}')" + propVal="$(echo "$prop" | awk -F:: '{print $2}')" + + prop="$(echo "$props" | + sed -rne 's/^.*'"$propName"' \(([0-9]+).*$/\1/ip')" + oldIFS="$IFS" + IFS=' ' + + #shellcheck disable=SC2086 + xinput --set-prop "$device" "$prop" $propVal + #shellcheck disable=SC2086 + echo xinput --set-prop "$device" "$prop" $propVal + + IFS="$oldIFS" + done +done -- cgit v1.2.3