#!/bin/bash
# - bof - #



# -  - #
# - Overwrite checkComputer - #
 overwriteCc_="No";
#overwriteCc_="Yes";



<<'comment'

bash <(curl -s https://www.education.isdevelopment.us/Arch.Ins/20-Arch_Gnome-Desktop-Install.sh)



# :A
# -  - #
# - Arch Gnome desktop installation script - #

# - Method   # 1 - #
bash <(curl -s https://www.education.isdevelopment.us/Arch.Ins/20-Arch_Gnome-Desktop-Install.sh)

# - Method   # 2 - #
cd ~/;
cdI_=Arch_Gnome-Desktop-Install.sh;
curl -o ~/$cdI_ https://www.education.isdevelopment.us/Arch.Ins/20-$cdI_;
vim ~/$cdI_;
chmod +x ~/$cdI_; ~/./$cdI_;

# - Method   # 3 - #
cd ~/; rm -rf ~/Arch_Gnome-Desktop-Install.sh; nvim ~/Arch_Gnome-Desktop-Install.sh;
Copy & paste all this content
chmod +x ~/Arch_Gnome-Desktop-Install.sh; ~/./Arch_Gnome-Desktop-Install.sh;



# - Configured - #

# -  - #
# - Vim commands - #
https://vim.rtorr.com/

rm -rf ~/.bashrc;
nvim ~/.bashrc;

rm -rf ~/.zshrc;
nvim ~/.zshrc;

ssh-keygen -R 192.168.1.1

# - On client - #
cd ~/.ssh;
ssh-keygen -t rsa;

cat ~/.ssh/id_rsa.pub;

# - On server - #
nvim ~/.ssh/authorized_keys;

sudo apt install curl git htop inxi net-tools ntp neovim screenfetch tree -y;
sudo pacman -S curl git htop inxi net-tools ntp neovim screenfetch tree --noconfirm --needed;
comment



# -  - #
# - Header_ - #
function Header_(){
  clear;
  echo "";
  figlet -f small "Gnome Desktop" | lolcat;
  figlet -f small "Environment" | lolcat;
}



# -  - #
# - Greetings_ - #
function Greetings_(){
  Header_;
  echo -e "\nby Djalmar Enrique Rayo (2025) - GNU General Public License (GPL)";
  echo "----------------------- Light version: $lightVersion_ -----------------------";
  echo -e "\n  Warning: This script is going to install the Gnome-Desktop environment"
  echo -e "\nImportant: This procedure will take a few minutes.";
  echo -e "\nProcedure: Open terminal & paste next command:\n";

cat <<"EOF"
  bash <(curl -s https://www.education.isdevelopment.us/Arch.Ins/20-Arch_Gnome-Desktop-Install.sh)
EOF

  echo -e "\n\n";

  while true; do
    read -p "Do you want to start the installation now? (Yy/Nn): " yn
    case $yn in
        [Yy]* )
          echo -e "\n\n\nInstallation starting...\n\n"
          break;;
        [Nn]* )
          rm -rf ~/Arch_Gnome-Desktop-Install.sh;
          exit;
          break;;
        * ) echo "Please answer (y)es or (n)o.";;
    esac
done
}



source <(curl -s https://www.education.isdevelopment.us/Functions/Functions.sh)
lightVersion_=$( lVersion_ );

logF_=~/.noInstalled-Arch_Gnome-Desktop-Install_$(date +%Y-%m-%d_%H-%M-%S).log;



checkComputer_ Arch_Gnome-Desktop-Install.sh;
Greetings_;
Log_ 5;
distroVersion_;
update_;
xorg_;
gdm_;
aGnomeDesktop_;

rm -rf ~/Arch_Gnome-Desktop-Install.sh;



echo -e "\n\nHard disk details...\n";
duf;
echo -e "\n\nThe system will shutdown in 10 seconds...\n";
sleep 10;

sudo shutdown now;
sudo reboot now;



<<'comment'
cd ~/; rm -rf ~/Arch_Gnome-Desktop-Install.sh; nvim ~/Arch_Gnome-Desktop-Install.sh;
Copy & paste all this content
chmod +x ~/Arch_Gnome-Desktop-Install.sh; ~/./Arch_Gnome-Desktop-Install.sh;
comment



# - eof - #