Improve xbox controller installation flow

This commit is contained in:
David Heinemeier Hansson
2026-05-04 09:45:33 +02:00
parent 5b288f1e28
commit 5d3d3fd78a
2 changed files with 22 additions and 7 deletions
+21 -6
View File
@@ -6,15 +6,30 @@
set -e
# Install xpadneo to ensure controllers work out of the box
omarchy-pkg-add linux-headers
omarchy-pkg-aur-add xpadneo-dkms
omarchy-pkg-add linux-headers xpadneo-dkms
# Prevent xpad/xpadneo driver conflict
echo blacklist xpad | sudo tee /etc/modprobe.d/blacklist-xpad.conf >/dev/null
echo hid_xpadneo | sudo tee /etc/modules-load.d/xpadneo.conf >/dev/null
# Give user access to game controllers
sudo usermod -a -G input $USER
# Ensure user is in the input group (controllers need it)
needs_reboot=false
if ! id -nG "$USER" | grep -qw input; then
sudo usermod -aG input "$USER"
needs_reboot=true
fi
# Modules need to be loaded
gum confirm "Install requires reboot. Ready?" && sudo reboot now
# Swap drivers in the running kernel so a reboot isn't needed otherwise
if lsmod | grep -q '^xpad '; then
sudo modprobe -r xpad 2>/dev/null || needs_reboot=true
fi
if $needs_reboot; then
gum confirm "Reboot needed to finish setup. Reboot now?" && sudo reboot now
exit 0
fi
sudo modprobe hid_xpadneo
echo ""
echo "Xbox controller Bluetooth support is active. Pair it with Bluetooth using Super + Ctrl + B."
+1 -1
View File
@@ -386,7 +386,7 @@ show_install_ai_menu() {
}
show_install_gaming_menu() {
case $(menu "Install" " Steam\n RetroArch\n󰍳 Minecraft\n Battle.net\n󰢹 NVIDIA GeForce NOW\n󰖺 Xbox Controller [AUR]") in
case $(menu "Install" " Steam\n RetroArch\n󰍳 Minecraft\n Battle.net\n󰢹 NVIDIA GeForce NOW\n󰖺 Xbox Controller (󰂯)") in
*Steam*) present_terminal omarchy-install-gaming-steam ;;
*RetroArch*) present_terminal omarchy-install-gaming-retroarch ;;
*Minecraft*) install_and_launch "Minecraft" "minecraft-launcher" "minecraft-launcher" ;;