#!/bin/sh # run-mxergo - configure a MX Ergo trackball ID=$(xinput list --id-only 'pointer:Logitech MX Ergo') [ -z "$ID" ] && exit 1 # Mouse button 8 (down) -> button 2 xinput set-button-map $ID 1 2 3 4 5 6 7 2 9 # Mouse button 9 (up) -> scroll #xinput set-prop $ID 329 1 #xinput set-prop $ID 333 9 xinput set-prop $ID "Evdev Wheel Emulation" 1 xinput set-prop $ID "Evdev Wheel Emulation Button" 9