So I’ve recently switched semi-permanently over to using Linux Mint as my OS on my Lenovo W530. Using *nix as a desktop OS isn’t new for me, back i the day I used to run FreeBSD4.4 with Window Maker on an IBM PII 350Mhz desktop box.
However, things have moved on nicely and when I have my laptop sitting in my dock, I have a mouse plugged in, namely a Razer Mamba. This is a great mouse, and one of only 2 mice I actually enjoy using (my other trusty steeds are a couple of Logitech LX8s). The issue I have is that under Linux Mint both the trackpad and mouse are waaaay too fast for my liking and the type of use I need them for, despite being adjusted to the lowest setting in the Mouse & Touchpad settings, so I use xinput to set them directly. The problem is, is that the mouse is listed twice; the first instance is for the mouse, and the second instance as a “keyboard” (I guess this is due to the programmable nature of the device, which means I need to set the properties by using the device ID instead of the name. Not too much of an issue if you do it manually, but I want to automate this at login as setting it manually each time will get very boring, very quickly, so I decided to use PHP for this purpose as I already have it installed on the laptop.
I use the following script to set both the trackpad and mouse speeds according to the values I like. YMMV and the values can easily be adjusted from the constants at the top of the script.