X-Git-Url: https://git.madduck.net/etc/xsession.git/blobdiff_plain/00d3aaa4438509e32247d91b7becb5d30d72bf08..refs/heads/master:/.bin/xconfig?ds=inline 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."