How to make a program that finds id's of xinput devices and sets xinput some settings

前端 未结 6 1874
天命终不由人
天命终不由人 2020-12-24 07:30

I have a G700 mouse connected to my computer. The problem with this mouse in Linux (Ubuntu) is that the sensitivity is very high. I also don\'t like mouse acceleration, so I

6条回答
  •  长情又很酷
    2020-12-24 08:05

    For the fun of it, same answer, but simpler way to parse and get ids:

    for id in $(xinput list | grep 'Logitech USB Receiver' |  grep pointer | cut -d '=' -f 2 | cut -f 1); do xinput --set-button-map $id 3 2 1; done
    

    Took me a while to figure out this can get the ids:

    xinput | cut -d '=' -f 2 | cut -f 1
    

提交回复
热议问题