norisa.sh 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 -pr "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. mkdir -p ~/.build && cd ~/.build || exit
  11. # install aur helper (pacaur)
  12. cd /tmp || exit
  13. pacman -S --noconfirm expac jq
  14. rm -rf /tmp/pacaur*
  15. curl -sO https://aur.archlinux.org/cgit/aur.git/snapshot/yay.tar.gz &&
  16. sudo -u "$username" tar -xvf yay.tar.gz
  17. cd yay || exit
  18. sudo -u "$username" makepkg --noconfirm -si
  19. # clone dotfiles repo
  20. cd /tmp || exit
  21. git clone https://github.com/noahvogt/dotfiles.git
  22. cp /tmp/dotfiles/.* /home/"$username" /root
  23. # shellcheck source=/dev/null
  24. source ~/.bashrc
  25. # build dwm
  26. cd /tmp || exit
  27. git clone https://github.com/noahvogt/dwm.git
  28. cd /dwm || exit
  29. make clean install
  30. # build st
  31. cd /tmp || exit
  32. git clone https://github.com/noahvogt/st.git
  33. cd /st || exit
  34. make clean install
  35. # build dwmblocks
  36. cd /tmp || exit
  37. git clone https://github.com/noahvogt/dwmblocks.git
  38. cd /dwmblocks || exit
  39. make clean install
  40. # download packages from the official repo
  41. pacman -S 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
  42. # install aur packages
  43. sudo -u "$username" yay -S betterlockscreen simple-mtpfs-git tibasicc-git xflux