#!/bin/bash
# - bof - #



<<'comment'

xdg-user-dirs-update;
sudo apt install dialog duf curl figlet git lolcat neovim pv webapp-manager -y;
sudo apt install dialog duf curl figlet git htop inxi lolcat net-tools neovim pv webapp-manager -y;

bash <(curl -s https://www.education.isdevelopment.us/Arch.Ins/Software.Ins/BashFiles.Ins/UbuntuGrubConfiguration.sh)

# -  - #
# - Timezone setting - #
sudo timedatectl set-timezone America/New_York;
timedatectl;



# -  - #
cd ~/; rm -rf ~/uGrub.sh; nvim ~/uGrub.sh;
copy & paste this content
chmod +x ~/uGrub.sh; ~/./uGrub.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;

# -  - #
# - Remove swap file - #
sudo swapoff -v /swap.img;
sudo rm -rf /swap.img;
free -h;

comment



# -  - #
# - uGrub_ - #
function uGrub_(){
  local gF_=/etc/default/grub;
  echo -e "\n\nConfiguring $gF_...";

  sudo sed -i 's/^#\?GRUB_TIMEOUT=.*/GRUB_TIMEOUT=5/' $gF_;
  sudo sed -i 's/^GRUB_TIMEOUT_STYLE=.*/GRUB_TIMEOUT_STYLE=menu/' $gF_;
  sudo update-grub;
  rm -rf ~/uGrub.sh;

  echo -e  "\n\n\nGrub was configured successfully.";
  echo -e  "\nThe system will reboot in 10 seconds to apply changes...\n\n\n";
  sleep 10;

  sudo reboot now;
}



clear;
uGrub_;



<<'comment'
cd ~/; rm -rf ~/uGrub.sh; nvim ~/uGrub.sh;
copy & paste this content
chmod +x ~/uGrub.sh; ~/./uGrub.sh;
comment



# - eof - #