Skip to content

Instantly share code, notes, and snippets.

@benkant
Last active August 15, 2018 18:41
Show Gist options
  • Save benkant/2c781f3bad3e584125565c15f9203f2a to your computer and use it in GitHub Desktop.
Save benkant/2c781f3bad3e584125565c15f9203f2a to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# slow down crazy fast gaming mouse on X
if [[ `uname` == 'Darwin' ]]; then
echo "Exiting: I don't know what this does on macOS even with XQuartz."
exit 1;
fi
FASTMOUSE=$(xinput --list --short|grep -i sabre|cut -f 2 |sed 's/id=//g')
for id in ${FASTMOUSE[@]}; do
xinput --set-prop $id "Device Accel Constant Deceleration" 10
xinput --set-prop $id "Device Accel Velocity Scaling" 10
# natural scrolling
xinput --set-prop $id "Evdev Scrolling Distance" -1 -1 -1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment