I need to find a gamepad in my list of /dev/input/event* devices, and the only thing I know about it is that when I do evtest
it shows up with the name G13
.
The problem is every time I reboot it gets a different number. I would like to automate finding the path so I can pass it to this command in the $G13
variable:
I tried evtest | grep G13
but the problem is the evtest command doesn't terminate on its own, it's interactive, so my script gets stuck on a prompt.
xboxdrv --evdev $G13 --config ~/.config/xboxdrv/G13.conf &