Last active
January 20, 2017 16:27
-
-
Save Yrds/f4100965dbf2698f1d3137cd54592139 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#SCRIPT TO DETECT MULTIPLE CONTROLLERS(BASED ON GREP AT LINE #6) AND PASS TO XBOXDRV | |
############ DO NOT USE THIS WITH A ORIGINAL XBOX GAMEPAD PLUGGED IN, YOU CAN PLUG AFTER RUNNING THE SCRIPT ############ | |
set -e | |
config=/home/yuri/config.xboxdrv | |
joysticks=$(ls /dev/input/by-path/ | grep event-joystick) | |
for i in $joysticks; do | |
xboxdrv -c $config --evdev /dev/input/by-path/$i & XBOXPID+=$! | |
done | |
echo "Pressione CTRL+C para encerrar" | |
while true;do | |
sleep 300 | |
done | |
for i in $XBOXPID; do | |
kill $i | |
wait $i | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment