Advertisement
Guest User

Config Script

a guest
Sep 4th, 2024
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.90 KB | Source Code | 0 0
  1. #!/bin/bash
  2.  
  3. echo "Now configuring your Arch system."
  4. ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime
  5. hwclock
  6. pacman -Syu intel-ucode sof-firmware networkmanager wpa_supplicant nano man-db man-pages texinfo bluez bluez-utils reflector sudo alsa alsa-utils pulseaudio pulseaudio-bluetooth pulseaudio-alsa pulseaudio-equalizer git rust
  7. systemctl enable --now reflector alsa-restore alsa-state bluetooth
  8. amixer sset Master unmute
  9. amixer sset Speaker unmute
  10. amixer sset Headphone unmute
  11. wifi=$(lspci | grep -o "Broadcom")
  12.     if [ "$wifi" == "Broadcom" ];
  13.         then
  14.         pacman -Syu broadcom-wl-dkms linux-headers
  15.         echo "Broadcom Wireless drivers installed."
  16.     else
  17.         echo "No Broadcom drivers needed"
  18.     fi
  19. echo "Which Desktop Environment would you like to install?"
  20. select opt in Xfce MATE Cinnamon Budgie KDE none; do
  21.     case $opt in
  22.         Xfce)
  23.             pacman -Syu xfce4 xfce4-goodies network-manager-applet xfce4-pulseaudio-plugin lightdm lightdm-slick-greeter
  24.             systemctl enable lightdm
  25.             break
  26.             ;;
  27.         MATE)
  28.             pacman -Syu mate mate-extra network-manager-applet mate-applet-dock blueman paprefs lightdm lightdm-slick-greeter
  29.             systemctl enable lightdm
  30.             break
  31.             ;;
  32.         Cinnamon)
  33.             pacman -Syu cinnamon network-manager-applet gnome-keyring blueberry paprefs lightdm lightdm-slick-greeter
  34.             systemctl enable lightdm
  35.             break
  36.             ;;
  37.         Budgie)
  38.             pacman -Syu budgie budgie-extras network-manager-applet budgie-desktop-view budgie-backgrounds materia-gtk-theme arc-gtk-theme papirus-icon-theme plasma-pa paprefs lightdm lightdm-slick-greeter
  39.             systemctl enable lightdm
  40.             break
  41.             ;;
  42.         KDE)
  43.             pacman -Syu plasma kde-applications sddm sddm-kcm
  44.             systemctl enable sdddm
  45.             break
  46.             ;;
  47.         none)
  48.             echo "Skipping desktop environment installation."
  49.             break
  50.             ;;
  51.         *)
  52.             echo "Invalid option $REPLY"
  53.             ;;
  54.     esac
  55. done
  56. useradd -m -G wheel -s bash <username>
  57. passwd <username>
  58. echo "visudo will open soon. Please add the following line if it does not already exist (no quotes): '%wheel      ALL=(ALL:ALL) ALL' "
  59. EDITOR=nano visudo
  60. systemctl enable lightdm NetworkManager
  61. su <username> -c git clone https://aur.archlinux.org/paru.git && cd paru && makepkg -i && head -n -1 ~/.bashrc > temp && mv temp ~/.bashrc && echo "alias yay='\paru -c && \paru -Syu && \paru --devel && \paru -S --needed'" >> ~/.bashrc && echo "alias yeet='paru -Rns'" >> ~/.bashrc && echo "PS1='[\[\e[38;5;51;1;2m\]\u\[\e[0;1m\]@\[\e[38;5;51;2m\]\h\[\e[0m\]\w]\$ '" >> ~/.bashrc && cd ~ && echo "#!/bin/bash" > dm.sh && echo -en "\n" >> dm.sh && echo "dm=$(ps auxf | awk '{print $11}' | \grep -E '(lightdm|sddm)$')" >> dm.sh && echo "  if [ $dm == lightdm ];" >> dm.sh && echo "then" >> dm.sh && echo "paru -S mkinitcpio-firmware arch-update lightdm-settings" >> dm.sh && echo "else" >> dm.sh && echo "paru -S mkinitcpio-firmware arch-update" >> dm.sh && echo "fi" >> dm.sh && chmod 0775 dm.sh && ./dm.sh && rm dm.sh && rm -R ./paru
  62. pacman -Rs rust
  63. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement