#!/bin/bash
# - bof - #



<<'comment'
# -  - #
# - Install fastFetch - #
xdg-user-dirs-update;
sudo apt install dialog duf curl figlet git lolcat neovim openssh-server pv webapp-manager -y;
sudo apt install dialog duf curl figlet git htop inxi lolcat net-tools neovim openssh-server pv webapp-manager -y;

bash <(curl -s https://www.education.isdevelopment.us/fastFetch/fastFetch.sh)

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



# :a
# -  - #
# - Documentation - #
https://idroot.us/install-fastfetch-ubuntu-24-04/
comment



# -  - #
# - uFastfetch_ - #
function uFastfetch_(){
  local sF_=fastfetch \
        sDwn_=~/Downloads;

  echo -e "\nInstalling $sF_...";

  case "$Opt" in
    1)
      sudo apt install $sF_ -y;
      ;;
    4)
      echo -e "\nInstalling dependencies...\n";

      lPrograms1_="build-essential cmake git libpci-dev libvulkan-dev \
                  libwayland-dev libxrandr-dev libxcb-randr0-dev libdconf-dev net-tools";
      sPackages_ "$lPrograms1_";

      echo -e "\n\n\nCloning $sF_ repository...\n";
      cd $sDwn_;
      git clone https://github.com/LinusDierheimer/fastfetch.git;
      cd $sF_;

      echo -e "\n\n\nBuilding $sF_...\n";
      mkdir -p build;
      cd build;
      cmake ..;
      cmake --build . --target $sF_;

      echo -e "\n\n\nInstalling $sF_...\n";
      sudo cmake --install .;

      cd $Dir_;
      rm -rf $sDwn_/$sF_;
      ;;
  esac

  echo -e "\n$sF_ was installed successfully...\n\n\n";
}



# -  - #
# - aFastfetch_ - #
function aFastfetch_(){
  local sF_="fastfetch";
  echo -e "\nInstalling $sF_...\n";
  sudo pacman -S $sF_ --noconfirm --needed;
  echo -e "\n$sF_ was installed successfully...\n\n\n";
}



# -  - #
# - fFastfetch_ - #
function fFastfetch_(){
  local sF_="fastfetch";
  echo -e "\nInstalling $sF_...\n";
  sudo dnf install $sF_ -y;
  echo -e "\n$sF_ was installed successfully...\n\n\n";
}



# -  - #
# - installFastFetch_ - #
function installFastFetch_(){
  case $Opt in
    1 | 4 )
      # - ubuntu, debian, linuxmint, zorin - #
      uFastfetch_;
      ;;
    2 )
      # - arch - #
      aFastfetch_;
      ;;
    3 )
      # - fedora - #
      fFastfetch_;
      ;;
  esac
}



clear;

if [ "$( which fastfetch )" == "" ]; then
  source <(curl -s https://www.education.isdevelopment.us/Functions/Functions.sh)
  distroVersion_;
  update_;
  installFastFetch_;
else
  echo -e "\n\nFastfetch is already installed...\n\n\n";
fi;
sleep 5;



# - eof - #