norisa.sh 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/bin/bash
  2. pacman -Sy --noconfirm git vim || { printf "Error at script start:\n\nAre you sure you're running this as the root user?\n\t(Tip: run 'whoami' to check)\n\nAre you sure you have an internet connection?\n\t(Tip: run 'ip a' to check)\n"; exit; }
  3. # make new user
  4. sed -i 's/# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/g' /etc/sudoers
  5. read -p "What is your desired username? " username
  6. useradd -m -g users -G wheel "$username"
  7. passwd "$username"
  8. cd /home/"$username" || exit
  9. # setting up build environment
  10. sudo -u "$username" mkdir -p /home/"$username"/.build && cd .. && chown -R "$username":wheel "$username"/.build/
  11. pwd
  12. ls "$username"
  13. # install aur helper (pacaur)
  14. cd /home/"$username"/.build || exit
  15. pacman -S --noconfirm expac jq
  16. rm -rf /tmp/pacaur*
  17. curl -sO https://aur.archlinux.org/cgit/aur.git/snapshot/yay.tar.gz &&
  18. tar xvf yay.tar.gz
  19. cd .. && chown -R "$username":wheel .build/ && cd .build
  20. cd yay || exit
  21. sudo -u "$username" makepkg --noconfirm -si
  22. pacman -S --noconfirm xorg-server xorg-xinit xorg-xwininfo xorg-xprop xorg-xbacklight xorg-xdpyinfo xorg-xsetroot
  23. sudo -u "$username" yay -S --noconfirm libxft-bgra-git
  24. # clone dotfiles repo
  25. cd /home/"$username"/.build || exit
  26. git clone https://github.com/noahvogt/dotfiles.git
  27. cp dotfiles/.* /home/"$username" /root
  28. # shellcheck source=/dev/null
  29. source ~/.bashrc
  30. # build dwm
  31. cd /home/"$username"/.build || exit
  32. git clone https://github.com/noahvogt/dwm.git
  33. cd dwm || exit
  34. make clean install
  35. # build st
  36. cd /home/"$username"/.build || exit
  37. git clone https://github.com/noahvogt/st.git
  38. cd st || exit
  39. make clean install
  40. # build dwmblocks
  41. cd /home/"$username"/.build || exit
  42. git clone https://github.com/noahvogt/dwmblocks.git
  43. cd dwmblocks || exit
  44. make clean install
  45. # download packages from the official repo
  46. pacman -S --noconfirm xorg-server xorg-xinit xorg-xwininfo xorg-xprop xorg-xbacklight xorg-xdpyinfo xorg-xsetroot picom xbindkeys jdk-openjdk dmenu geogebra shellcheck vim firefox syncthing ranger xournalpp ffmpeg obs-studio sxiv arandr man-db brightnessctl unzip unrar python mupdf mediainfo highlight pulseaudio-alsa pulsemixer pamixer ttf-linux-libertine calcurse xclip noto-fonts-emoji imagemagick thunderbird gimp xorg-setxkbmap wavemon cmus texlive-most
  47. # install aur packages
  48. sudo -u "$username" yay -S --noconfirm betterlockscreen simple-mtpfs-git tibasicc-git xflux