mirror of
https://github.com/JaKooLit/Debian-Hyprland.git
synced 2025-12-21 10:20:12 +01:00
updated regarding Debian-Hyprland Project
This commit is contained in:
parent
c61a182151
commit
a60f5dd83b
@ -1,5 +1,8 @@
|
|||||||
## Changelogs
|
## Changelogs
|
||||||
|
|
||||||
|
## 22 Apr 2024
|
||||||
|
- Change dotfiles to specific version only as Debian and Ubuntu cant keep up with Hyprland development
|
||||||
|
|
||||||
## 20 Apr 2024
|
## 20 Apr 2024
|
||||||
- Change default Oh-my-zsh theme to xiong-chiamiov-plus
|
- Change default Oh-my-zsh theme to xiong-chiamiov-plus
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,11 @@
|
|||||||
### ♨️♨️♨️ ATTENTION ♨️♨️♨️ 06 Dec 2023
|
### ♨️♨️♨️ ATTENTION ♨️♨️♨️ 06 Dec 2023
|
||||||
- Recent hyprland release v0.33.0, needed a newer libdrm and Debian dont have newer libdrm yet on their repo. That is why for now, the hyprland version to be installed with this script is v0.32.3
|
- Recent hyprland release v0.33.0, needed a newer libdrm and Debian dont have newer libdrm yet on their repo. That is why for now, the hyprland version to be installed with this script is v0.32.3
|
||||||
|
|
||||||
|
### ♨️♨️♨️ ATTENTION ♨️♨️♨️ 22 Apr 2024
|
||||||
|
- Pre-configured dotfiles to be downloaded here will be v2.2.6 only
|
||||||
|
- [`Hyprland-Dots v2.2.6`](https://github.com/JaKooLit/Hyprland-Dots/releases/tag/v2.2.6)
|
||||||
|
- This is because Debian/Ubuntu are very slow with Hyprland Development
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> install a backup tool like `snapper` or `timeshift`. and Backup your system before installing hyprland using this script. This script does NOT include uninstallation of packages
|
> install a backup tool like `snapper` or `timeshift`. and Backup your system before installing hyprland using this script. This script does NOT include uninstallation of packages
|
||||||
|
|
||||||
|
|||||||
@ -1,83 +1,51 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# 💫 https://github.com/JaKooLit 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
# Hyprland-Dots to download from Releases #
|
# Hyprland-Dots to download a specific release #
|
||||||
|
|
||||||
|
# Define the specific release version to download
|
||||||
|
specific_version="v2.2.6"
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
|
|
||||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
||||||
|
|
||||||
printf "${NOTE} Downloading / Checking for existing Hyprland-Dots.tar.gz...\n"
|
printf "${NOTE} Downloading / Checking for existing Hyprland-Dots-${specific_version}.tar.gz...\n"
|
||||||
|
|
||||||
# Check if Hyprland-Dots.tar.gz exists
|
# Check if the specific release tarball exists
|
||||||
if [ -f Hyprland-Dots.tar.gz ]; then
|
if [ -f "Hyprland-Dots-${specific_version}.tar.gz" ]; then
|
||||||
printf "${NOTE} Hyprland-Dots.tar.gz found.\n"
|
printf "${NOTE} Hyprland-Dots-${specific_version}.tar.gz found.\n"
|
||||||
|
echo -e "${OK} Hyprland-Dots-${specific_version}.tar.gz is already downloaded."
|
||||||
# Get the version from the existing tarball filename
|
exit 0
|
||||||
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)."
|
|
||||||
read -p "Do you want to upgrade to the latest version? (y/n): " upgrade_choice
|
|
||||||
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
|
fi
|
||||||
|
|
||||||
printf "\n"
|
printf "${NOTE} Downloading the Hyprland-Dots-${specific_version} source code release...\n"
|
||||||
|
|
||||||
printf "${NOTE} Downloading the latest Hyprland-Dots source code release...\n"
|
# Fetch the tag name for the specific release using the GitHub API
|
||||||
|
release_info=$(curl -s "https://api.github.com/repos/JaKooLit/Hyprland-Dots/releases/tags/${specific_version}")
|
||||||
# Fetch the tag name for the latest release using the GitHub API
|
if [ -z "$release_info" ]; then
|
||||||
latest_tag=$(curl -s https://api.github.com/repos/JaKooLit/Hyprland-Dots/releases/latest | grep "tag_name" | cut -d '"' -f 4)
|
echo -e "${ERROR} Unable to fetch information for release ${specific_version}." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
|
||||||
|
|
||||||
# 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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Fetch the tarball URL for the latest release using the GitHub API
|
# Get the tarball URL for the specific release
|
||||||
latest_tarball_url=$(curl -s https://api.github.com/repos/JaKooLit/Hyprland-Dots/releases/latest | grep "tarball_url" | cut -d '"' -f 4)
|
tarball_url=$(echo "$release_info" | grep "tarball_url" | cut -d '"' -f 4)
|
||||||
|
|
||||||
# Check if the URL is obtained successfully
|
# Check if the URL is obtained successfully
|
||||||
if [ -z "$latest_tarball_url" ]; then
|
if [ -z "$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"
|
echo -e "${ERROR} Unable to fetch the tarball URL for release ${specific_version}." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get the filename from the URL and include the tag name in the file name
|
# Download the specific release source code tarball to the current directory
|
||||||
file_name="Hyprland-Dots-${latest_tag}.tar.gz"
|
if curl -L "$tarball_url" -o "Hyprland-Dots-${specific_version}.tar.gz"; then
|
||||||
|
|
||||||
# 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
|
# Extract the contents of the tarball
|
||||||
tar -xzf "$file_name" || exit 1
|
tar -xzf "Hyprland-Dots-${specific_version}.tar.gz" || exit 1
|
||||||
|
|
||||||
# delete existing Hyprland-Dots
|
# Delete existing Hyprland-Dots
|
||||||
rm -rf JaKooLit-Hyprland-Dots
|
rm -rf JaKooLit-Hyprland-Dots
|
||||||
|
|
||||||
# Identify the extracted directory
|
# Identify the extracted directory
|
||||||
extracted_directory=$(tar -tf "$file_name" | grep -o '^[^/]\+' | uniq)
|
extracted_directory=$(tar -tf "Hyprland-Dots-${specific_version}.tar.gz" | grep -o '^[^/]\+' | uniq)
|
||||||
|
|
||||||
# Rename the extracted directory to JaKooLit-Hyprland-Dots
|
# Rename the extracted directory to JaKooLit-Hyprland-Dots
|
||||||
mv "$extracted_directory" JaKooLit-Hyprland-Dots || exit 1
|
mv "$extracted_directory" JaKooLit-Hyprland-Dots || exit 1
|
||||||
@ -88,9 +56,9 @@ if curl -L "$latest_tarball_url" -o "$file_name"; then
|
|||||||
chmod +x copy.sh
|
chmod +x copy.sh
|
||||||
./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"
|
echo -e "${OK} Hyprland-Dots-${specific_version} 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
|
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"
|
echo -e "${ERROR} Failed to download Hyprland-Dots-${specific_version} release." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@ -32,6 +32,11 @@ echo "$(tput bold)$(tput setaf 7)Debian doesn't have the newer libdrm yet on the
|
|||||||
echo "$(tput bold)$(tput setaf 7)For now, the Hyprland version to be installed with this script will be v0.32.3$(tput sgr0)"
|
echo "$(tput bold)$(tput setaf 7)For now, the Hyprland version to be installed with this script will be v0.32.3$(tput sgr0)"
|
||||||
printf "\n%.0s" {1..3}
|
printf "\n%.0s" {1..3}
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..5}
|
||||||
|
echo "$(tput bold)$(tput setaf 3)ATTENTION!!!! One MORE IMPORTANT NOTICE!!!! $(tput sgr0)"
|
||||||
|
echo "$(tput bold)$(tput setaf 7)Dotfiles version to be downloaded here will be specific to v2.2.6 only $(tput sgr0)"
|
||||||
|
echo "$(tput bold)$(tput setaf 7)Debian and Ubuntu Cant keep up with Hyprland development. $(tput sgr0)"
|
||||||
|
printf "\n%.0s" {1..3}
|
||||||
|
|
||||||
read -p "$(tput setaf 6)Would you like to proceed? (y/n): $(tput sgr0)" proceed
|
read -p "$(tput setaf 6)Would you like to proceed? (y/n): $(tput sgr0)" proceed
|
||||||
|
|
||||||
@ -154,7 +159,7 @@ ask_yes_no "-Install nwg-look? (a GTK Theming app - lxappearance-like) WARN! Thi
|
|||||||
printf "\n"
|
printf "\n"
|
||||||
ask_yes_no "-Installing on Asus ROG Laptops?" rog
|
ask_yes_no "-Installing on Asus ROG Laptops?" rog
|
||||||
printf "\n"
|
printf "\n"
|
||||||
ask_yes_no "-Do you want to download and install pre-configured Hyprland-dotfiles?" dots
|
ask_yes_no "-Do you want to download and install pre-configured Hyprland-dotfiles v2.2.6?" dots
|
||||||
printf "\n"
|
printf "\n"
|
||||||
|
|
||||||
# Ensuring all in the scripts folder are made executable
|
# Ensuring all in the scripts folder are made executable
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user