Archlinux basic installation configuration scripts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.1 KiB

2 years ago
  1. #!/bin/bash
  2. # Variables
  3. country=Poland
  4. kbmap=ch
  5. output=Virtual-1
  6. resolution=1920x1080
  7. # Options
  8. aur_helper=true
  9. install_ly=true
  10. gen_xprofile=false
  11. sudo timedatectl set-ntp true
  12. sudo hwclock --systohc
  13. sudo reflector -c $country -a 12 --sort rate --save /etc/pacman.d/mirrorlist
  14. # sudo firewall-cmd --add-port=1025-65535/tcp --permanent
  15. # sudo firewall-cmd --add-port=1025-65535/udp --permanent
  16. # sudo firewall-cmd --reload
  17. # sudo virsh net-autostart default
  18. if [[ $aur_helper = true ]]; then
  19. cd /tmp
  20. git clone https://aur.archlinux.org/paru.git
  21. cd paru/;makepkg -si --noconfirm;cd
  22. fi
  23. # Install packages
  24. sudo pacman -S xorg firefox polkit-gnome nitrogen lxappearance thunar
  25. # Install fonts
  26. sudo pacman -S --noconfirm dina-font tamsyn-font bdf-unifont ttf-bitstream-vera ttf-croscore ttf-dejavu ttf-droid gnu-free-fonts ttf-ibm-plex ttf-liberation ttf-linux-libertine noto-fonts ttf-roboto tex-gyre-fonts ttf-ubuntu-font-family ttf-anonymous-pro ttf-cascadia-code ttf-fantasque-sans-mono ttf-fira-mono ttf-hack ttf-fira-code ttf-inconsolata ttf-jetbrains-mono ttf-monofur adobe-source-code-pro-fonts cantarell-fonts inter-font ttf-opensans gentium-plus-font ttf-junicode adobe-source-han-sans-otc-fonts adobe-source-han-serif-otc-fonts noto-fonts-cjk noto-fonts-emoji
  27. # Pull Git repositories and install
  28. cd /tmp
  29. repos=( "dmenu" "dwm" "dwmstatus" "st" "slock" )
  30. for repo in ${repos[@]}
  31. do
  32. git clone git://git.suckless.org/$repo
  33. cd $repo;make;sudo make install;cd ..
  34. done
  35. # XSessions and dwm.desktop
  36. if [[ ! -d /usr/share/xsessions ]]; then
  37. sudo mkdir /usr/share/xsessions
  38. fi
  39. cat > ./temp << "EOF"
  40. [Desktop Entry]
  41. Encoding=UTF-8
  42. Name=Dwm
  43. Comment=Dynamic window manager
  44. Exec=dwm
  45. Icon=dwm
  46. Type=XSession
  47. EOF
  48. sudo cp ./temp /usr/share/xsessions/dwm.desktop;rm ./temp
  49. # Install ly
  50. if [[ $install_ly = true ]]; then
  51. git clone https://aur.archlinux.org/ly
  52. cd ly;makepkg -si
  53. sudo systemctl enable ly
  54. fi
  55. # .xprofile
  56. if [[ $gen_xprofile = true ]]; then
  57. cat > ~/.xprofile << EOF
  58. setxkbmap $kbmap
  59. nitrogen --restore
  60. xrandr --output $output --mode $resolution
  61. EOF
  62. fi
  63. printf "\e[1;32mDone! you can now reboot.\e[0m\n"