updated and hopefully ready for release candidate :)

This commit is contained in:
JaKooLit
2025-02-06 19:14:58 +09:00
parent 8a60729680
commit 79af4e7b7d
6 changed files with 14 additions and 121 deletions

View File

@@ -1,100 +0,0 @@
#!/bin/bash
# 💫 https://github.com/JaKooLit 💫 #
# Hyprland-Dots to download from Releases #
if [[ $USE_PRESET = [Yy] ]]; then
source ./preset.sh
fi
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
printf "${NOTE} Downloading / Checking for existing Hyprland-Dots.tar.gz...\n"
# Check if Hyprland-Dots.tar.gz exists
if [ -f Hyprland-Dots.tar.gz ]; then
printf "${NOTE} Hyprland-Dots.tar.gz found.\n"
# Get the version from the existing tarball filename
existing_version=$(echo Hyprland-Dots.tar.gz | grep -oP 'v\d+\.\d+\.\d+' | sed 's/v//')
# Fetch the tag_name for the latest release using the GitHub API
latest_version=$(curl -s https://api.github.com/repos/JaKooLit/Hyprland-Dots/releases/latest | grep "tag_name" | cut -d '"' -f 4 | sed 's/v//')
# Check if versions match
if [ "$existing_version" = "$latest_version" ]; then
echo -e "${OK} Hyprland-Dots.tar.gz is up-to-date with the latest release ($latest_version)."
# Sleep for 10 seconds before exiting
printf "${NOTE} No update found. Sleeping for 10 seconds...\n"
sleep 10
exit 0
else
echo -e "${WARN} Hyprland-Dots.tar.gz is outdated (Existing version: $existing_version, Latest version: $latest_version)."
if [[ -z $upgrade_choice ]]; then
read -p "Do you want to upgrade to the latest version? (y/n): " upgrade_choice
fi
if [ "$upgrade_choice" = "y" ]; then
echo -e "${NOTE} Proceeding to download the latest release." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
# Delete existing directories starting with JaKooLit-Hyprland-Dots
find . -type d -name 'JaKooLit-Hyprland-Dots*' -exec rm -rf {} +
rm -f Hyprland-Dots.tar.gz
printf "${WARN} Removed existing Hyprland-Dots.tar.gz.\n"
else
echo -e "${NOTE} User chose not to upgrade. Exiting..." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
exit 0
fi
fi
fi
printf "${NOTE} Downloading the latest Hyprland source code release...\n"
# Fetch the tag name for the latest release using the GitHub API
latest_tag=$(curl -s https://api.github.com/repos/JaKooLit/Hyprland-Dots/releases/latest | grep "tag_name" | cut -d '"' -f 4)
# Check if the tag is obtained successfully
if [ -z "$latest_tag" ]; then
echo -e "${ERROR} Unable to fetch the latest tag information." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
exit 1
fi
# Fetch the tarball URL for the latest release using the GitHub API
latest_tarball_url=$(curl -s https://api.github.com/repos/JaKooLit/Hyprland-Dots/releases/latest | grep "tarball_url" | cut -d '"' -f 4)
# Check if the URL is obtained successfully
if [ -z "$latest_tarball_url" ]; then
echo -e "${ERROR} Unable to fetch the tarball URL for the latest release." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
exit 1
fi
# Get the filename from the URL and include the tag name in the file name
file_name="Hyprland-Dots-${latest_tag}.tar.gz"
# Download the latest release source code tarball to the current directory
if curl -L "$latest_tarball_url" -o "$file_name"; then
# Extract the contents of the tarball
tar -xzf "$file_name" || exit 1
# delete existing Hyprland-Dots
rm -rf JaKooLit-Hyprland-Dots
# Identify the extracted directory
extracted_directory=$(tar -tf "$file_name" | grep -o '^[^/]\+' | uniq)
# Rename the extracted directory to JaKooLit-Hyprland-Dots
mv "$extracted_directory" JaKooLit-Hyprland-Dots || exit 1
cd "JaKooLit-Hyprland-Dots" || exit 1
# Set execute permission for copy.sh and execute it
chmod +x copy.sh
./copy.sh
echo -e "${OK} Latest Dotfiles release downloaded, extracted, and processed successfully. Check JaKooLit-Hyprland-Dots folder for more detailed install logs" 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
else
echo -e "${ERROR} Failed to download the latest Dotfiles release." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
exit 1
fi
printf "\n%.0s" {1..2}

View File

@@ -1,9 +1,6 @@
#!/bin/bash
# 💫 https://github.com/JaKooLit 💫 #
# Nvidia Stuffs #
if [[ $USE_PRESET = [Yy] ]]; then
source ./preset.sh
fi
nvidia_pkg=(
nvidia-dkms

View File

@@ -2,10 +2,6 @@
# 💫 https://github.com/JaKooLit 💫 #
# Thunar #
if [[ $USE_PRESET = [Yy] ]]; then
source ./preset.sh
fi
thunar=(
thunar
thunar-volman

View File

@@ -39,8 +39,8 @@ ISAUR=$(command -v yay || command -v paru)
if [ -n "$ISAUR" ]; then
printf "\n%s - ${SKY_BLUE}AUR helper${RESET} already installed, moving on.\n" "${OK}"
else
printf "\n%s - Installing ${SKY_BLUE}yay${RESET} from AUR\n" "${NOTE}"
git clone https://aur.archlinux.org/yay.git || { printf "%s - Failed to clone ${YELLOW}yay${RESET} from AUR\n" "${ERROR}"; exit 1; }
printf "\n%s - Installing ${SKY_BLUE}yay-bin${RESET} from AUR\n" "${NOTE}"
git clone https://aur.archlinux.org/yay-bin.git || { printf "%s - Failed to clone ${YELLOW}yay${RESET} from AUR\n" "${ERROR}"; exit 1; }
cd yay || { printf "%s - Failed to enter yay directory\n" "${ERROR}"; exit 1; }
makepkg -si --noconfirm 2>&1 | tee -a "$LOG" || { printf "%s - Failed to install ${YELLOW}yay${RESET} from AUR\n" "${ERROR}"; exit 1; }

View File

@@ -88,7 +88,7 @@ if ! pacman -Qs pciutils > /dev/null; then
fi
echo "${WARN} ${WARNING}ATTENTION: Choosing Y on use preset question will install also ${MAGENTA}nvidia packages!!!${RESET}"
echo "${WARNING}ATTENTION: Choosing Y on use preset question will install also ${MAGENTA}nvidia packages!!!${RESET}"
echo "${YELLOW}CTRL C or Q to cancel and edit the file ${MAGENTA}preset.sh${RESET} ${RESET}"
echo "If you are not sure what to do, answer N in here"
read -p "${SKY_BLUE}Would you like to Use ${YELLOW}Preset Install Settings?${RESET} (See note above)? (y/n): ${RESET}" use_preset
@@ -214,7 +214,7 @@ fi
# Input group
printf "\n"
if ! groups "$(whoami)" | grep -q '\binput\b'; then
printf "${NOTE} Please note that adding yourself to the ${YELLOW}input${RESET} group might be necessary for ${YELLOW}waybar keyboard-state functionality${RESET} \n."
printf "${NOTE} adding to ${YELLOW}input${RESET} group might be necessary for ${YELLOW}waybar keyboard-state functionality${RESET} \n"
ask_yes_no "-Would you like to be added to the ${YELLOW}input${RESET} group?" input_group
fi

View File

@@ -1,5 +1,4 @@
# 💫 https://github.com/JaKooLit 💫 #
#
# CREDIT to: https://github.com/PostCyberPunk for this Preset function
## -- Make sure you use the right answer or install script will fail ###
@@ -22,30 +21,31 @@ bluetooth="Y"
###-Do you want to install Thunar file manager?
thunar="Y"
### Do you want to set Thunar as the default file manager? (y/n): "
### Do you want to set Thunar as the default file manager?
thunar_choice="Y"
### " Please note that adding yourself to the 'input' group might be necessary for waybar keyboard-state functionality."
### " Adding user to the 'input' group might be necessary for waybar keyboard-state functionality."
input_group="Y"
### Install ${YELLOW}AGS (aylur's GTK shell) v1${RESET} for Desktop-Like Overview?"
### Install AGS (aylur's GTK shell) v1 for Desktop-Like Overview?"
ags="Y"
###-Install & configure SDDM log-in Manager plus (OPTIONAL) SDDM Theme?
###-Install & configure SDDM log-in Manager
sddm="Y"
### Would you like to install SDDM themes? (y/n)
### install and download SDDM themes
sddm_theme="Y"
###-Install XDG-DESKTOP-PORTAL-HYPRLAND? (For proper Screen Share ie OBS)
xdph="Y"
###-Install zsh, oh-my-zsh & (Optional) pokemon-colorscripts?
###-Install zsh, oh-my-zsh
zsh="Y"
### OPTIONAL - Do you want to add Pokemon color scripts? (y/n):
### add Pokemon color scripts to terminal (y/n):
pokemon_choice="Y"
###-Installing in a Asus ROG Laptops?
###-Installing on Asus ROG Laptops?
rog="N"
###-Do you want to download pre-configured Hyprland dotfiles?
###-Download and Add pre-configured Hyprland dotfiles?
dots="Y"