2

I have two mice, one at home with resolution 800dpi and one at work with resolution 1000dpi. The two mice behave differently. When I come to work, I need to set the pointer speed to max. When I work from home, I need to turn the speed down a bit.

I would like to have profiles for the two mice. Ideally, these would be applied automatically, depending on what mouse is connected. How would I do that?

Running Ubuntu 15.10.

1 Answer 1

1

You can detect which mouse is connected in X11 using xinput. Eg

$ xinput --list
...
Logitech USB Optical Mouse               id=11   [slave  pointer  (2)]

Note the value in id=, 11 in this example, which is the device's id. You can use this id to set the ratio for mouse movement:

xinput --set-ptr-feedback $id threshold numerator denominator

or simply

xset m numerator/denominator threshold

To auto-detect a change in mouse is a little more difficult. The simplest is to run udevadm monitor and look for the udev events generated when a mouse in plugged in.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .