2024-06-30 17:12:07 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
scripts_PATH=$(pwd)
|
|
|
|
username=$(whoami)
|
|
|
|
home_PATH=/home/$username
|
|
|
|
|
|
|
|
echo -e "\n\n\n\n"
|
|
|
|
echo ""
|
|
|
|
echo "===================="
|
|
|
|
echo " Arch Desktop Setup "
|
|
|
|
echo "===================="
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
while true; do
|
|
|
|
read -p "Enter a dotfiles repository (enter to skip): " repo
|
|
|
|
if [[ ! -z $repo ]]; then
|
|
|
|
if [[ ! -f /bin/git ]]; then
|
|
|
|
echo "Authentication Is Required. Enter $username's password"
|
|
|
|
echo "sudo pacman -S --noconfirm --needed git"
|
|
|
|
echo ""
|
|
|
|
fi
|
|
|
|
if [[ ! -d $home_PATH/Repos ]]; then
|
|
|
|
echo "mkdir $home_PATH/Repos"
|
|
|
|
fi
|
|
|
|
echo "git clone $repo $home_PATH/Repos/dotfiles"
|
|
|
|
if [[ $? == 0 ]]; then
|
2024-06-30 17:53:45 +00:00
|
|
|
for file in $home_PATH/Repos/dotfiles/*; do
|
2024-06-30 17:12:07 +00:00
|
|
|
echo "ln -s $file $home_PATH/.config/"
|
|
|
|
done
|
|
|
|
break
|
|
|
|
else
|
|
|
|
echo -e "\n\n\n"
|
|
|
|
while true; do
|
|
|
|
read -p "Could not find repository. Try again? (y/n): " response
|
|
|
|
if [[ "${response,,}" == "y" ]]; then
|
|
|
|
redo="${response,,}"
|
|
|
|
break
|
|
|
|
elif [[ "${response,,}" == "n" ]]; then
|
|
|
|
redo="${response,,}"
|
|
|
|
break
|
|
|
|
else
|
|
|
|
echo "Invalid Response (y/n)"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if [[ $redo == "n" ]]; then
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
echo -e "\n\n\n\n"
|
|
|
|
echo ""
|
|
|
|
echo "=================="
|
|
|
|
echo " Install Packages "
|
|
|
|
echo "=================="
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
echo "sudo pacman -S --noconfirm --needed base-devel"
|
|
|
|
while IFS= read -r line ; do
|
|
|
|
echo "sudo pacman -S --noconfirm --needed $line"
|
2024-06-30 17:53:45 +00:00
|
|
|
done < $scripts_PATH/arch-assets/archpkg.txt
|
2024-06-30 17:12:07 +00:00
|
|
|
|
|
|
|
echo -e "\n\n\n\n"
|
|
|
|
echo ""
|
|
|
|
echo "=================="
|
|
|
|
echo " Setup Essentials "
|
|
|
|
echo "=================="
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
# Setup Firewall
|
|
|
|
echo "Setup UFW"
|
|
|
|
echo ""
|
|
|
|
echo "sudo ufw default deny incoming"
|
|
|
|
echo "sudo ufw default allow outgoing"
|
|
|
|
# Allow SSH on Default port
|
|
|
|
echo "sudo ufw allow 22"
|
|
|
|
# Allow SSH on Alternate Port
|
|
|
|
echo ""
|
|
|
|
read -p "Would you like to set an alternate SSH port? (Empty to skip) " sshPort
|
|
|
|
if [[ ! -z $sshPort && $sshPort =~ ^[0-9]+$ ]]; then
|
|
|
|
echo "sudo ufw allow $sshPort"
|
|
|
|
fi
|
2024-06-30 17:53:45 +00:00
|
|
|
echo "systemctl enable ufw"
|
2024-06-30 17:12:07 +00:00
|
|
|
|
|
|
|
# Setup Printer
|
|
|
|
echo "systemctl enable cups"
|
|
|
|
echo "systemctl start cups"
|
|
|
|
|
|
|
|
# Setup Yay
|
|
|
|
while true;do
|
|
|
|
read -p "Do you want to install yay? (y/n) " answer
|
|
|
|
if [[ "${answer,,}" == "y" ]]; then
|
|
|
|
if [[ ! -d $home_PATH/Software ]]; then
|
|
|
|
echo "mkdir $home_PATH/Software"
|
|
|
|
fi
|
|
|
|
echo "git clone https://aur.archlinux.org/yay.git $home_PATH/Software/yay && cd $home_PATH/Software/yay && makepkg -si --noconfirm --needed && cd"
|
|
|
|
break
|
|
|
|
elif [[ "${answer,,}" == "n" ]]; then
|
|
|
|
break
|
|
|
|
else
|
|
|
|
echo "Invalid Response (y/n)"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2024-07-01 01:20:46 +00:00
|
|
|
echo -e "\n\n\n\n"
|
|
|
|
echo ""
|
|
|
|
echo "========"
|
|
|
|
echo " Tweaks "
|
|
|
|
echo "========"
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
# Get JetBrainsMono font
|
|
|
|
font_PATH="$home_PATH/.local/share/fonts"
|
|
|
|
if [[ ! -d $font_PATH ]]; then
|
|
|
|
echo "mkdir $font_PATH"
|
|
|
|
fi
|
|
|
|
echo "cd $font_PATH"
|
|
|
|
echo "wget https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.tar.xz"
|
|
|
|
echo "cd $font_PATH && tar -xvf JetBrainsMono.tar.xz"
|
|
|
|
echo "cd ''"
|
|
|
|
echo ""
|
|
|
|
|
2024-07-01 06:21:53 +00:00
|
|
|
# Build pijulius's Picom
|
|
|
|
|
|
|
|
while true; do
|
|
|
|
read -p "Do you want to install the Pijulius's Picom? (y/n) " answer
|
|
|
|
if [[ "${answer,,}" == "y" ]]; then
|
|
|
|
echo "sudo pacman -S --noconfirm --needed "
|
|
|
|
echo "git clone https://github/pijulius/picom $home_PATH/Software/picom"
|
|
|
|
echo "cd $home_PATH/Software/picom"
|
|
|
|
echo "git checkout implemented-window-animations"
|
|
|
|
echo "git submodule update --init --recursive"
|
|
|
|
echo "meson --buildtype=release . build"
|
|
|
|
echo "ninja -C build"
|
|
|
|
echo "ninja -C build install"
|
|
|
|
echo "cd ''"
|
|
|
|
break
|
|
|
|
elif [[ "${answer,,}" == "n" ]]; then
|
|
|
|
break
|
|
|
|
else
|
|
|
|
echo "Invalid Response (y/n)"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2024-06-30 17:12:07 +00:00
|
|
|
echo -e "\n\n\n\n"
|
|
|
|
echo ""
|
|
|
|
echo "=================="
|
|
|
|
echo " Gaming Setup "
|
|
|
|
echo "=================="
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
while true; do
|
|
|
|
read -p "Do you want to install the Gaming Setup? (y/n) " answer
|
|
|
|
if [[ "${answer,,}" == "y" ]]; then
|
|
|
|
argument="$scripts_PATH/arch-assets/archgamingpkg.txt"
|
|
|
|
bash $scripts_PATH/scripts/archgamingsetup.sh $argument
|
|
|
|
break
|
|
|
|
elif [[ "${answer,,}" == "n" ]]; then
|
|
|
|
break
|
|
|
|
else
|
|
|
|
echo "Invalid Response (y/n)"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
echo -e "\n\n\n\n"
|
|
|
|
echo ""
|
|
|
|
echo "================="
|
|
|
|
echo " Game Dev Apps "
|
|
|
|
echo "================="
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
while true; do
|
|
|
|
read -p "Do you want to install the Gaming Development Setup? (y/n) " answer
|
|
|
|
if [[ "${answer,,}" == "y" ]]; then
|
|
|
|
argument="$scripts_PATH/arch-assets/archgamedevpkg.txt"
|
|
|
|
bash $scripts_PATH/scripts/archgamedevsetup.sh $argument
|
|
|
|
break
|
|
|
|
elif [[ "${answer,,}" == "n" ]]; then
|
|
|
|
break
|
|
|
|
else
|
|
|
|
echo "Invalid Response (y/n)"
|
|
|
|
fi
|
|
|
|
done
|