#!/bin/bash
# - bof - #



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

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



<<'comment'

sh -c "$(curl -fsSL 'https://www.education.isdevelopment.us/Arch.Ins/30-Arch_PlasmaKDE-Desktop-Install.sh')"



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

# - Method   # 1 - #
sh -c "$(curl -fsSL 'https://www.education.isdevelopment.us/Arch.Ins/30-Arch_PlasmaKDE-Desktop-Install.sh')"

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

# - Method   # 3 - #
cd ~/; rm -rf ~/Arch_PlasmaKDE-Desktop-Install.sh; nvim ~/Arch_PlasmaKDE-Desktop-Install.sh;
Copy & paste all this content
chmod +x ~/Arch_PlasmaKDE-Desktop-Install.sh; ~/./Arch_PlasmaKDE-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



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

cat <<"EOF"
  sh -c "$(curl -fsSL 'https://www.education.isdevelopment.us/Arch.Ins/30-Arch_PlasmaKDE-Desktop-Install.sh')"
EOF

  echo -e "\n\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_PlasmaKDE-Desktop-Install.sh;
          exit;
          break;;
        * ) echo "Please answer (y)es or (n)o.";;
    esac
done
}



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



# -  - #
# - plasmaKDE_Desktop_ - #
function plasmaKDE_Desktop_(){
  echo -e "\n\n\nInstalling KDE Plasma Desktop...\n\n";

  lPrograms1_="kde-applications konsole plasma plasma-wayland-session";
  tInstall_=$(sPackages_ "$lPrograms1_");
  sudo pacman -S $tInstall_ --noconfirm --needed;

  echo -e "\n\n\nKDE Plasma desktop was installed successfully...\n\n\n";
  sleep 10;
}



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



checkComputer_ Arch_PlasmaKDE-Desktop-Install.sh;
Greetings_;
Log_ 6;
distroVersion_;
update_;
xorg_;
sddm_;
plasmaKDE_Desktop_;



rm -rf ~/Arch_PlasmaKDE-Desktop-Install.sh;
echo -e "\n\nThe system will reboot in 10 seconds...\n";
sleep 10;

sudo reboot now;



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



# - eof - #