Hello, guys. What's up?
I've recently bought a bluetooth mouse and its pointer normal speed is very fast. So, every time I turn on my laptop or log out and log back in again, I have to change its speed. After some searching, I found the following commands on internet:
1) I have to find out my mouse ID, so I use this command...
... which gives me this output...
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=13 [slave pointer (2)]
⎜ ↳ Samsung S Action Mouse ET-MP900D id=11 [slave pointer (2)]
2) Now that I know the ID, I use this command...
xinput set-prop 11 "Device Accel Constant Deceleration" 1.75
xinput set-prop 11 "Device Accel Adaptive Deceleration" 1.75
And it's done! It works perfectly!
So I decided to create a bash script to do this automatically every time a logged in. I did it, but then I realized that the ID sometimes changes. For example, sometimes it's 11, sometimes it's 13, so my bash script wouldn't work properly.
So, here I am to ask you, experts, if there is any way to get this ID automatically, maybe using GREP, I don't know. The mouse is always the same, a "Samsung S Action Mouse ET-MP900D". Actually, if you don't mind, please, I'd like you to show me how to do that because, I confess, this "bash thing" is something very new to me. I know the logic, I mean, I know I will have to get that ID value and store it in a variable; then I will use this variable in those commands (xinput set-prop [variable] "Device...), but I admit I don't really know how to do that. So, if you could show me how, I would really appreciate it.
Well, that's it. I hope you can help me. Thanks in advance for your time.