Skip to content

Instantly share code, notes, and snippets.

@NeoTheFox
Created January 29, 2016 19:52
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save NeoTheFox/b219f9b222975b8bc18d to your computer and use it in GitHub Desktop.
Save NeoTheFox/b219f9b222975b8bc18d to your computer and use it in GitHub Desktop.
#!/usr/bin/bash
xconfig="/etc/X11/xorg.conf"
if [ -e "$xconfig" ]
then
echo "Nvidia xconfig detected"
echo "Switching to mesa..."
sudo pacman -S lib32-mesa-libgl mesa-libgl
sudo rm $xconfig
else
echo "No Nvidia xconfig detected"
echo "Switching to Nvidia.."
sudo nvidia-xconfig
sudo pacman -S lib32-nvidia-libgl nvidia-libgl
fi
echo "Switched"
sudo systemctl restart lightdm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment