Improve xbox controller installation flow
This commit is contained in:
@@ -6,15 +6,30 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Install xpadneo to ensure controllers work out of the box
|
# Install xpadneo to ensure controllers work out of the box
|
||||||
omarchy-pkg-add linux-headers
|
omarchy-pkg-add linux-headers xpadneo-dkms
|
||||||
omarchy-pkg-aur-add xpadneo-dkms
|
|
||||||
|
|
||||||
# Prevent xpad/xpadneo driver conflict
|
# Prevent xpad/xpadneo driver conflict
|
||||||
echo blacklist xpad | sudo tee /etc/modprobe.d/blacklist-xpad.conf >/dev/null
|
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
|
echo hid_xpadneo | sudo tee /etc/modules-load.d/xpadneo.conf >/dev/null
|
||||||
|
|
||||||
# Give user access to game controllers
|
# Ensure user is in the input group (controllers need it)
|
||||||
sudo usermod -a -G input $USER
|
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
|
# Swap drivers in the running kernel so a reboot isn't needed otherwise
|
||||||
gum confirm "Install requires reboot. Ready?" && sudo reboot now
|
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
@@ -386,7 +386,7 @@ show_install_ai_menu() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
show_install_gaming_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 ;;
|
*Steam*) present_terminal omarchy-install-gaming-steam ;;
|
||||||
*RetroArch*) present_terminal omarchy-install-gaming-retroarch ;;
|
*RetroArch*) present_terminal omarchy-install-gaming-retroarch ;;
|
||||||
*Minecraft*) install_and_launch "Minecraft" "minecraft-launcher" "minecraft-launcher" ;;
|
*Minecraft*) install_and_launch "Minecraft" "minecraft-launcher" "minecraft-launcher" ;;
|
||||||
|
|||||||
Reference in New Issue
Block a user