X-Git-Url: https://git.madduck.net/etc/xsession.git/blobdiff_plain/553827432ce1201b160e1f5b3072ea51d6c6a72b..6cbdaad0231128540075681e8b19cd2217ea1990:/.bin/xconfig?ds=sidebyside 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."