Skip to content

Instantly share code, notes, and snippets.

@louisswarren
Last active May 10, 2017 19:21
Show Gist options
  • Save louisswarren/0fae6a321fc1e0f0fcdcbef681cc73b5 to your computer and use it in GitHub Desktop.
Save louisswarren/0fae6a321fc1e0f0fcdcbef681cc73b5 to your computer and use it in GitHub Desktop.
Set mouse sensitivity with xinput
#!/bin/sh
# Set mouse sensitivity
inputnum=`xinput list | grep -oE "USB OPTICAL MOUSE.*id=[0-9]+" | grep -oE "[0-9]+" | head -n 1`
propnum=`xinput list-props "$inputnum" | grep -oE "Coordinate Transformation Matrix \([0-9]+\)" | grep -oE "[0-9]+"`
xinput set-prop "$inputnum" "$propnum" "$1" 0 0 0 "$1" 0 0 0 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment