How do you configure xinput to set multiple devices automatically using a script?
$ xinput --list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ AlpsPS/2 ALPS GlidePoint id=12 [slave pointer (2)] ⎜ ↳ ALPS PS/2 Device id=13 [slave pointer (2)] ⎜ ↳ Corsair Corsair M65 Gaming Mouse id=15 [slave pointer (2)] ⎜ ↳ Corsair Corsair M65 Gaming Mouse id=17 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Power Button id=6 [slave keyboard (3)] ↳ Video Bus id=7 [slave keyboard (3)] ↳ Power Button id=8 [slave keyboard (3)] ↳ Sleep Button id=9 [slave keyboard (3)] ↳ Laptop_Integrated_Webcam_HD id=10 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=11 [slave keyboard (3)] ↳ Dell WMI hotkeys id=14 [slave keyboard (3)] ↳ Corsair Corsair M65 Gaming Mouse id=16 [slave keyboard (3)] And the problem is both of these "corsair gaming mouse" have different IDs every time. I don't know why there are two mouses... but that's the world I live in. How do I write a script to set the properties on both of them? I used this, but it didn't work the next time I booted (ID changed):
#!/bin/sh xinput --set-pr op 10 "Device Accel Profile" 6 xinput --set-prop 10 "Device Accel Velocity Scaling" 5 xinput --set-prop 10 "Device Accel Constant Deceleration" 3 #xinput --set-prop 10 "Device Accel Velocity Tracker Count" 2 I had tried using the name, but it complains there are multiple matching devices.
Any help is appreciated.