summarylogtreecommitdiffstats
path: root/99-nexus-gamepad-uinput.rules
diff options
context:
space:
mode:
authorNathan Lowe2017-04-15 16:26:03 -0400
committerNathan Lowe2017-04-15 16:26:03 -0400
commit95790717534721e8c718fb9bd928cfc27686e667 (patch)
tree269ef30695e882cd65f689d50db08fb453f56527 /99-nexus-gamepad-uinput.rules
downloadaur-95790717534721e8c718fb9bd928cfc27686e667.tar.gz
Initial Commit
Diffstat (limited to '99-nexus-gamepad-uinput.rules')
-rw-r--r--99-nexus-gamepad-uinput.rules7
1 files changed, 7 insertions, 0 deletions
diff --git a/99-nexus-gamepad-uinput.rules b/99-nexus-gamepad-uinput.rules
new file mode 100644
index 000000000000..0a5e6a06e89c
--- /dev/null
+++ b/99-nexus-gamepad-uinput.rules
@@ -0,0 +1,7 @@
+#place in /etc/udev/rules.d/99-nexus-gamepad-uinput.rules
+
+#Run uinput program
+ACTION=="add", KERNEL=="event*", SUBSYSTEM=="input", ATTRS{name}=="ASUS Gamepad", TAG+="systemd", ENV{SYSTEMD_WANTS}="nexus_gamepad@%n.service"
+
+#Remove all joysticks related to this device
+ACTION=="add", KERNEL=="js[0-9]*", ATTRS{name}=="ASUS Gamepad", RUN+="/bin/rm /dev/input/js%n"