From 86c5c5699f28edac995e9a992ad400aeefa54922 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sun, 24 Jan 2021 22:25:39 -0500 Subject: [PATCH] Do better stuff with touchpad preferences in i3 --- config/i3/config | 1 + local/bin/xinput-preferences | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100755 local/bin/xinput-preferences diff --git a/config/i3/config b/config/i3/config index 503411b..e030f58 100644 --- a/config/i3/config +++ b/config/i3/config @@ -4,6 +4,7 @@ font pango:Comic Code Bold 13 exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork exec --no-startup-id setxkbmap -layout dvorak +exec --no-startup-id ~/.local/bin/xinput-preferences # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod diff --git a/local/bin/xinput-preferences b/local/bin/xinput-preferences new file mode 100755 index 0000000..3b19b87 --- /dev/null +++ b/local/bin/xinput-preferences @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -o errexit +set -o pipefail + +main() { + _setup_elan_touchpad +} + +_setup_elan_touchpad() { + local etp='Elan Touchpad' + + xinput list | if ! grep -q "${etp}"; then + return + fi + xinput set-prop "${etp}" 'libinput Tapping Enabled' 1 + xinput set-prop "${etp}" 'libinput Natural Scrolling Enabled' 1 +} + +main "${@}"