summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenton Liu2020-06-18 12:15:04 -0400
committerDenton Liu2020-06-18 12:15:04 -0400
commit336a5c7d82b4c96d55470cefea8a3ca91fce96be (patch)
treeeaa02d1360cd8e0cc9e5d4b0be837ccdbf988df1
downloadaur-336a5c7d82b4c96d55470cefea8a3ca91fce96be.tar.gz
Initial commit
-rw-r--r--.SRCINFO11
-rw-r--r--70-nintendo.rules12
-rw-r--r--PKGBUILD18
3 files changed, 41 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b2a001c573f9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,11 @@
+pkgbase = nintendo-udev
+ pkgdesc = udev rules for Nintendo Joy-Cons and Pro Controllers
+ pkgver = 1.0.0
+ pkgrel = 1
+ arch = any
+ license = GPL
+ source = 70-nintendo.rules
+ sha256sums = 7b1f23f3134516c69612b38193ddd0ebda52467c1c1dcd306306323026697f97
+
+pkgname = nintendo-udev
+
diff --git a/70-nintendo.rules b/70-nintendo.rules
new file mode 100644
index 000000000000..68deb4c99e6a
--- /dev/null
+++ b/70-nintendo.rules
@@ -0,0 +1,12 @@
+# Switch Joy-con (L) (Bluetooth only)
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw", KERNELS=="0005:057E:2006.*", MODE="0666"
+
+# Switch Joy-con (R) (Bluetooth only)
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw", KERNELS=="0005:057E:2007.*", MODE="0666"
+
+# Switch Pro controller (USB and Bluetooth)
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="2009", MODE="0666"
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw", KERNELS=="0005:057E:2009.*", MODE="0666"
+
+# Switch Joy-con charging grip (USB only)
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="200e", MODE="0666"
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..a00647a3b47a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,18 @@
+# Maintainer: Denton Liu <liu.denton@gmail.com>
+#
+# Credit to /u/ultimatt42:
+# https://www.reddit.com/r/Stadia/comments/egcvpq/using_nintendo_switch_pro_controller_on_linux/fc5s7qm/
+
+pkgname=nintendo-udev
+pkgver=1.0.0
+pkgrel=1
+pkgdesc='udev rules for Nintendo Joy-Cons and Pro Controllers'
+arch=('any')
+license=('GPL')
+source=('70-nintendo.rules')
+sha256sums=('7b1f23f3134516c69612b38193ddd0ebda52467c1c1dcd306306323026697f97')
+
+package() {
+ cd "$srcdir"
+ install -Dm644 70-nintendo.rules "$pkgdir"/usr/lib/udev/rules.d/70-nintendo.rules
+}