Skip to content

Instantly share code, notes, and snippets.

@creaktive
Created January 15, 2011 20:56
Show Gist options
  • Save creaktive/781243 to your computer and use it in GitHub Desktop.
Save creaktive/781243 to your computer and use it in GitHub Desktop.
Apple Magic Mouse @ Ubuntu
#!/bin/sh
sudo hidd --connect C4:2C:03:99:6D:53
sleep 1
sudo bash -c 'echo Y > /sys/module/hid_magicmouse/parameters/scroll_acceleration'
sudo bash -c 'echo 40 > /sys/module/hid_magicmouse/parameters/scroll_speed'
ID=`xinput list --short | grep -i 'mouse' | cut -f2 | cut -c4-`
#xinput list-props $ID
xinput --set-prop $ID "Device Accel Adaptive Deceleration" 2.0
xinput --set-prop $ID "Device Accel Constant Deceleration" 2.0
xinput --set-prop $ID "Device Accel Velocity Scaling" 1.0
xinput --set-ptr-feedback $ID 1 2 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment