Saving mouse speed

danrobi@danrobi-desktop:~$ xinput list
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ Razer Razer DeathAdder Elite            	id=9	[slave  pointer  (2)]
⎜   ↳ Razer Razer DeathAdder Elite Consumer Control	id=11	[slave  pointer  (2)]
⎜   ↳ Logitech K400 Plus                      	id=14	[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)]
    ↳ Razer Razer DeathAdder Elite Keyboard   	id=10	[slave  keyboard (3)]
    ↳ Razer Razer DeathAdder Elite System Control	id=12	[slave  keyboard (3)]
    ↳ Razer Razer DeathAdder Elite            	id=13	[slave  keyboard (3)]
    ↳ Razer Razer DeathAdder Elite Consumer Control	id=15	[slave  keyboard (3)]
    ↳ Logitech K400 Plus                      	id=16	[slave  keyboard (3)]

I have to edit this post because i cant post anymore the site blocking me from posting
So here, you did it @wxl
Working! Nice :slight_smile:
Now, i have to paste that:

xinput --set-prop $(xinput list | grep "Razer Razer DeathAdder Elite[[:space:]]*id" | head -n1 | awk -F= '{print $2}' | awk '{print $1}') "libinput Accel Speed" -1

Into LXSession autostart, at add boxe and press add? Here?:

I see the problem. I was relying on your previous output which was actually not accurate. There’s actually whitespace between “Elite” and “id” so if we change our grep command to grep "Razer Razer DeathAdder Elite[[:space:]]*id" it will work. I’ll modify my answer above.

1 Like

Yep. The other thing you can do is to add it to the autostart file. Just add it to ~/.config/lxsession/Lubuntu/autostart. Prepend it with an @ and it will restart even if it crashes, which is kind of nice. At least that’s how it used to work. Perhaps with that fancy new tool (which I find buggy), that (more normal) way of doing things doesn’t work. The GUI autostart tool in 19.04 works really nice.

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.

Originally posted by @wxl

One thing you may want to try is take your command and put it in a script and use that with autostart. I’m not sure how capable of lxsession-default-apps is at dealing with lots of special characters. There are many in that command. That may be why it didn’t work.

You can put it wherever you want, but I suggest putting it in $HOME/bin . There should be the following lines in $HOME/.profile to add this to your $PATH so that you don’t have to call out the whole path to the file to run it:

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi 

If this is commented out (like the first line) remove the #.

If you don’t have the folder, just add it with mkdir $HOME/bin or use pcmanfm to do it for you.

Then create a new file there. Give it a name of your choosing. Let’s say you call it speedracer.

The contents of the file should be as such:

#!/usr/bin/env bash

xinput --set-prop $(xinput list | grep "Razer Razer DeathAdder Elite[[:space:]]*id" | head -n1 | awk -F= '{print $2}' | awk '{print $1}') "libinput Accel Speed" -1 

Now you need to make it executable. You can do this through the properties in pcmanfm or just do chmod +x $HOME/bin/speedracer .

Then you can just add speedracer to autostart rather than the whole command.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.