From 6cbdaad0231128540075681e8b19cd2217ea1990 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Thu, 31 Oct 2019 23:06:46 +1300 Subject: [PATCH] handle xinput xconfig --- .bin/xconfig | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.bin/xconfig b/.bin/xconfig index 6d09d4a..06fac0c 100755 --- a/.bin/xconfig +++ b/.bin/xconfig @@ -32,9 +32,20 @@ load_xresources() { xrdb -load ~/.Xresources } +config_xinput() { + echo -n >&2 " xinput" + xinput set-float-prop "TPPS/2 IBM TrackPoint" "Device Accel Constant Deceleration" 0.7 2>/dev/null || : + + WIRELESS_RECEIVER=$(xinput | sed -rne 's,.*Lenovo USB Receiver[[:space:]]+id=([[:digit:]]+).*pointer.*,\1,p') + if [ -n "$WIRELESS_RECEIVER" ]; then + xinput set-button-map $WIRELESS_RECEIVER 1 2 3 4 5 6 7 0 0 0 >/dev/null || : + fi +} + echo -n >&2 "Configuring X [" [ -n "${SKIP_XKB:-}" ] || config_xkb [ -n "${SKIP_XSET:-}" ] || config_xset [ -n "${SKIP_XSETROOT:-}" ] || config_xsetroot [ -n "${SKIP_XRESOURCES:-}" ] || load_xresources +[ -n "${SKIP_XINPUT:-}" ] || config_xinput echo >&2 " ] done." -- 2.39.2