From 25f35e166507b444e81f278c5a8143f9bdcf2071 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Tue, 30 Apr 2024 17:43:58 +0900 Subject: [PATCH] Bumping to Hyprland Version v0.39.1 :) --- CHANGELOGS.md | 2 +- install-scripts/hyprcursor.sh | 61 +++++++++++++++++++++++++++++++++++ install-scripts/hyprland.sh | 2 +- install.sh | 6 ---- 4 files changed, 63 insertions(+), 8 deletions(-) create mode 100755 install-scripts/hyprcursor.sh diff --git a/CHANGELOGS.md b/CHANGELOGS.md index 673dbec..0f0ef81 100644 --- a/CHANGELOGS.md +++ b/CHANGELOGS.md @@ -1,7 +1,7 @@ ## Changelogs ## 30 Apr 2024 -- Updated hyprland.sh to install v0.36.0 Hyprland +- Updated hyprland.sh to install v0.39.1 Hyprland - adding hypridle and hyprlock - dropping swaylock-effects and swayidle - adjusted to work with current Hyprland-Dots diff --git a/install-scripts/hyprcursor.sh b/install-scripts/hyprcursor.sh new file mode 100755 index 0000000..b9857f8 --- /dev/null +++ b/install-scripts/hyprcursor.sh @@ -0,0 +1,61 @@ +#!/bin/bash +# 💫 https://github.com/JaKooLit 💫 # +# hyprcursor # + +cursor=( +libzip-dev +librsvg2-dev +) + +## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## +# Determine the directory where the script is located +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +# Change the working directory to the parent directory of the script +PARENT_DIR="$SCRIPT_DIR/.." +cd "$PARENT_DIR" || exit 1 + +source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" + +# Set the name of the log file to include the current date and time +LOG="Install-Logs/install-$(date +%d-%H%M%S)_hyprcursor.log" +MLOG="install-$(date +%d-%H%M%S)_hyprcursor.log" + +# Installation of dependencies +printf "\n%s - Installing hyprcursor dependencies.... \n" "${NOTE}" + +for PKG1 in "${cursor[@]}"; do + install_package "$PKG1" 2>&1 | tee -a "$LOG" + if [ $? -ne 0 ]; then + echo -e "\e[1A\e[K${ERROR} - $PKG1 install had failed, please check the install.log" + exit 1 + fi +done + +# Check if hyprcursor folder exists and remove it +if [ -d "hyprcursor" ]; then + printf "${NOTE} Removing existing hyprcursor folder...\n" + rm -rf "hyprcursor" +fi + +# Clone and build +printf "${NOTE} Installing hyprcursor...\n" +if git clone https://github.com/hyprwm/hyprcursor.git; then + cd hyprcursor || exit 1 + cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build + cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF` + if sudo cmake --install ./build 2>&1 | tee -a "$MLOG" ; then + printf "${OK} hyprcursor installed successfully.\n" 2>&1 | tee -a "$MLOG" + else + echo -e "${ERROR} Installation failed for hyprcursor." 2>&1 | tee -a "$MLOG" + fi + #moving the addional logs to Install-Logs directory + mv $MLOG ../Install-Logs/ || true + cd .. +else + echo -e "${ERROR} Download failed for hyprcursor." 2>&1 | tee -a "$LOG" +fi + +clear + + diff --git a/install-scripts/hyprland.sh b/install-scripts/hyprland.sh index df98c99..e65fda5 100755 --- a/install-scripts/hyprland.sh +++ b/install-scripts/hyprland.sh @@ -25,7 +25,7 @@ if [ -d "Hyprland" ]; then rm -rf "Hyprland" 2>&1 | tee -a "$LOG" fi -if git clone --recursive -b v0.36.0 "https://github.com/hyprwm/Hyprland"; then +if git clone --recursive -b v0.39.1 "https://github.com/hyprwm/Hyprland"; then cd "Hyprland" || exit 1 make all if sudo make install 2>&1 | tee -a "$MLOG"; then diff --git a/install.sh b/install.sh index 5ac39d2..99b73c6 100755 --- a/install.sh +++ b/install.sh @@ -25,12 +25,6 @@ echo echo "$(tput setaf 3)NOTE: If you are installing on a VM, ensure to enable 3D acceleration else Hyprland wont start! $(tput sgr0)" echo -printf "\n%.0s" {1..3} -echo "$(tput bold)$(tput setaf 3)ATTENTION!!!! VERY IMPORTANT NOTICE!!!! $(tput sgr0)" -echo "$(tput bold)$(tput setaf 7)Due to fast development of Hyprland, Hyprland to be install here would be old version $(tput sgr0)" -echo "$(tput bold)$(tput setaf 7)For now, the Hyprland version to be installed with this script will be v0.36.0$(tput sgr0)" -printf "\n%.0s" {1..3} - read -p "$(tput setaf 6)Would you like to proceed? (y/n): $(tput sgr0)" proceed if [ "$proceed" != "y" ]; then