#!/bin/bash set -uo pipefail GREEN='\033[0;32m' YELLOW='\033[0;33m' BLUE='\033[0;34m' RED='\033[0;31m' NC='\033[0m' # ---- Preparing for setup ---- # Check if yay is present in the system if ! command -v yay &> /dev/null; then echo -e "${RED}Error: yay is required for this script to run.${NC}" exit 1 fi # Requesting sudo access echo -e "${YELLOW}Preparing for additional packages setup. Please allow sudo....${NC}" if ! sudo -v; then echo -e "${RED}Error: Failed to use sudo.${NC}" >&2 exit 1 fi echo # Ask the user if gaming packages are required echo -e "${BLUE}Do you need extra game-oriented packages? (y/n)${NC}" read additional_packages echo # ---- Packages setup ---- # Updating package databases echo -e "${YELLOW}Updating package databases....${NC}" yay -Sy echo # Installing base desktop packages echo -e "${YELLOW}Installing the base desktop packages....${NC}" yay -S --needed --noconfirm \ telegram wireguard-tools netbird-bin opencode pavucontrol \ pamixer spotify gimp obs-studio obsidian-bin libreoffice-fresh \ firefox sddm hyprnome git-credential-manager-bin qbittorrent \ scrcpy echo # Installing gaming-oriented packages if [[ "$additional_packages" =~ ^(y|ye|yes)?$ ]]; then echo -e "${YELLOW}Installing the game-oriented packages....${NC}" yay -S --needed --noconfirm \ discord wine steam prismlauncher echo fi # ---- Finished ---- echo -e "${GREEN}The additional packages setup is finished!${NC}"