diff --git a/auto-install.sh b/auto-install.sh old mode 100644 new mode 100755 diff --git a/dry-run-build.sh b/dry-run-build.sh old mode 100644 new mode 100755 diff --git a/install-scripts/aquamarine.sh b/install-scripts/aquamarine.sh index b5ce758..56ee761 100755 --- a/install-scripts/aquamarine.sh +++ b/install-scripts/aquamarine.sh @@ -57,7 +57,7 @@ if git clone --recursive -b $tag https://github.com/hyprwm/aquamarine.git; then echo "${NOTE} DRY RUN: Skipping installation of aquamarine $tag." fi #moving the addional logs to Install-Logs directory - mv $MLOG ../Install-Logs/ || true + [ -f "$MLOG" ] && mv "$MLOG" ../Install-Logs/ cd .. else echo -e "${ERROR} Download failed for ${YELLOW}aquamarine $tag${RESET}" 2>&1 | tee -a "$LOG" diff --git a/install-scripts/hyprgraphics.sh b/install-scripts/hyprgraphics.sh index 8a7cf9b..9674523 100755 --- a/install-scripts/hyprgraphics.sh +++ b/install-scripts/hyprgraphics.sh @@ -69,7 +69,7 @@ if git clone --recursive -b $tag https://github.com/hyprwm/hyprgraphics.git; the echo "${NOTE} DRY RUN: Skipping installation of hyprgraphics $tag." fi #moving the addional logs to Install-Logs directory - mv $MLOG ../Install-Logs/ || true + [ -f "$MLOG" ] && mv "$MLOG" ../Install-Logs/ cd .. else echo -e "${ERROR} Download failed for ${YELLOW}hyprgraphics $graphics${RESET}" 2>&1 | tee -a "$LOG" diff --git a/install-scripts/hyprland-protocols.sh b/install-scripts/hyprland-protocols.sh index 55740f6..69b1f9c 100755 --- a/install-scripts/hyprland-protocols.sh +++ b/install-scripts/hyprland-protocols.sh @@ -56,7 +56,7 @@ if git clone --recursive -b $tag https://github.com/hyprwm/hyprland-protocols.gi echo "${NOTE} DRY RUN: Skipping installation of hyprland-protocols $tag." fi #moving the addional logs to Install-Logs directory - mv $MLOG ../Install-Logs/ || true + [ -f "$MLOG" ] && mv "$MLOG" ../Install-Logs/ cd .. else echo -e "${ERROR} Download failed for ${YELLOW}hyprland-protocols tag${RESET}" 2>&1 | tee -a "$LOG" diff --git a/install-scripts/hyprland-qt-support.sh b/install-scripts/hyprland-qt-support.sh index be1b491..b9fb83e 100755 --- a/install-scripts/hyprland-qt-support.sh +++ b/install-scripts/hyprland-qt-support.sh @@ -77,7 +77,7 @@ if git clone --recursive -b $tag https://github.com/hyprwm/hyprland-qt-support.g echo "${NOTE} DRY RUN: Skipping installation of hyprland-qt-support $tag." fi #moving the addional logs to Install-Logs directory - mv $MLOG ../Install-Logs/ || true + [ -f "$MLOG" ] && mv "$MLOG" ../Install-Logs/ cd .. else echo -e "${ERROR} Download failed for ${YELLOW}hyprland-qt-support $tag${RESET}" 2>&1 | tee -a "$LOG" diff --git a/install-scripts/hyprland-qtutils.sh b/install-scripts/hyprland-qtutils.sh index b21ec57..caff755 100755 --- a/install-scripts/hyprland-qtutils.sh +++ b/install-scripts/hyprland-qtutils.sh @@ -79,7 +79,7 @@ if git clone --recursive -b $tag https://github.com/hyprwm/hyprland-qtutils.git; echo "${NOTE} DRY RUN: Skipping installation of hyprland-qtutils $tag." fi #moving the addional logs to Install-Logs directory - mv $MLOG ../Install-Logs/ || true + [ -f "$MLOG" ] && mv "$MLOG" ../Install-Logs/ cd .. else echo -e "${ERROR} Download failed for ${YELLOW}hyprland-qtutils $tag${RESET}" 2>&1 | tee -a "$LOG" diff --git a/install-scripts/hyprland.sh b/install-scripts/hyprland.sh index aba1768..2aa5d80 100755 --- a/install-scripts/hyprland.sh +++ b/install-scripts/hyprland.sh @@ -94,7 +94,7 @@ if git clone --recursive -b $tag "https://github.com/hyprwm/Hyprland"; then else echo "${NOTE} DRY RUN: Skipping installation of Hyprland $tag." fi - mv $MLOG ../Install-Logs/ || true + [ -f "$MLOG" ] && mv "$MLOG" ../Install-Logs/ cd .. else echo -e "${ERROR} Download failed for ${YELLOW}Hyprland $tag${RESET}" 2>&1 | tee -a "$LOG" diff --git a/install-scripts/hyprlang.sh b/install-scripts/hyprlang.sh index 9ffc16c..90c51f4 100755 --- a/install-scripts/hyprlang.sh +++ b/install-scripts/hyprlang.sh @@ -57,7 +57,7 @@ if git clone --recursive -b $tag https://github.com/hyprwm/hyprlang.git; then echo "${NOTE} DRY RUN: Skipping installation of hyprlang $tag." fi #moving the addional logs to Install-Logs directory - mv $MLOG ../Install-Logs/ || true + [ -f "$MLOG" ] && mv "$MLOG" ../Install-Logs/ cd .. else echo -e "${ERROR} Download failed for ${YELLOW}hyprlang $tag${RESET}" 2>&1 | tee -a "$LOG" diff --git a/install-scripts/hyprutils.sh b/install-scripts/hyprutils.sh index 4ba5e2e..991fb2e 100755 --- a/install-scripts/hyprutils.sh +++ b/install-scripts/hyprutils.sh @@ -54,7 +54,7 @@ if git clone -b $tag "https://github.com/hyprwm/hyprutils.git"; then else echo "${NOTE} DRY RUN: Skipping installation of hyprutils $tag." fi - mv $MLOG ../Install-Logs/ || true + [ -f "$MLOG" ] && mv "$MLOG" ../Install-Logs/ cd .. else echo -e "${ERROR} Download failed for hyprutils" 2>&1 | tee -a "$LOG" diff --git a/install-scripts/hyprwayland-scanner.sh b/install-scripts/hyprwayland-scanner.sh index 31b0b4e..c95b1f1 100755 --- a/install-scripts/hyprwayland-scanner.sh +++ b/install-scripts/hyprwayland-scanner.sh @@ -72,7 +72,7 @@ if git clone --recursive -b $tag https://github.com/hyprwm/hyprwayland-scanner.g echo "${NOTE} DRY RUN: Skipping installation of hyprwayland-scanner $tag." fi #moving the addional logs to Install-Logs directory - mv $MLOG ../Install-Logs/ || true + [ -f "$MLOG" ] && mv "$MLOG" ../Install-Logs/ cd .. else echo -e "${ERROR} Download failed for hyprwayland-scanner. Please check log." 2>&1 | tee -a "$LOG" diff --git a/install.sh b/install.sh index d3bc78b..adf8e1a 100755 --- a/install.sh +++ b/install.sh @@ -167,6 +167,13 @@ execute_script() { fi } +# Load centralized Hyprland stack tags if present and export for child scripts +if [ -f "./hypr-tags.env" ]; then + # shellcheck disable=SC1091 + source "./hypr-tags.env" + export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG HYPRWAYLAND_SCANNER_TAG HYPRLAND_PROTOCOLS_TAG HYPRLAND_QT_SUPPORT_TAG HYPRLAND_QTUTILS_TAG WAYLAND_PROTOCOLS_TAG +fi + ################# ## Default values for the options (will be overwritten by preset file if available) gtk_themes="OFF" @@ -383,6 +390,9 @@ execute_script "hyprland-qtutils.sh" sleep 1 execute_script "hyprland-protocols.sh" sleep 1 +# Ensure wayland-protocols (from source) is installed to satisfy Hyprland's >= 1.45 requirement +execute_script "wayland-protocols-src.sh" +sleep 1 execute_script "hyprland.sh" sleep 1 execute_script "hyprpolkitagent.sh" diff --git a/preset.sh b/preset.sh old mode 100644 new mode 100755 diff --git a/update-hyprland.sh b/update-hyprland.sh old mode 100644 new mode 100755 index 94e10ef..d407d18 --- a/update-hyprland.sh +++ b/update-hyprland.sh @@ -227,53 +227,64 @@ export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG H modules=("${filtered[@]}") fi - # Ensure wayland-protocols-src and aquamarine are installed before hyprland on install runs + # Ensure core prerequisites are installed before hyprland on install runs + # Order: wayland-protocols-src, hyprutils, hyprlang, aquamarine, hyprland if [[ $DO_INSTALL -eq 1 ]]; then - local has_hl=0 has_aqua=0 has_wp=0 + local has_hl=0 has_aqua=0 has_wp=0 has_utils=0 has_lang=0 for m in "${modules[@]}"; do [[ "$m" == "hyprland" ]] && has_hl=1 [[ "$m" == "aquamarine" ]] && has_aqua=1 [[ "$m" == "wayland-protocols-src" ]] && has_wp=1 + [[ "$m" == "hyprutils" ]] && has_utils=1 + [[ "$m" == "hyprlang" ]] && has_lang=1 done if [[ $has_hl -eq 1 ]]; then - # ensure wayland-protocols-src present - if [[ $has_wp -eq 0 ]]; then - modules=("wayland-protocols-src" "${modules[@]}") - fi - # ensure aquamarine present - if [[ $has_aqua -eq 0 ]]; then - modules=("aquamarine" "${modules[@]}") - fi - # Reorder to ensure wayland-protocols-src and aquamarine appear before hyprland + # ensure each prerequisite is present + [[ $has_wp -eq 0 ]] && modules=("wayland-protocols-src" "${modules[@]}") + [[ $has_utils -eq 0 ]] && modules=("hyprutils" "${modules[@]}") + [[ $has_lang -eq 0 ]] && modules=("hyprlang" "${modules[@]}") + [[ $has_aqua -eq 0 ]] && modules=("aquamarine" "${modules[@]}") + + # Reorder to exact sequence before hyprland # Remove existing occurrences and rebuild in correct order local tmp=() - local inserted_wp=0 inserted_aqua=0 + local inserted_wp=0 inserted_utils=0 inserted_lang=0 inserted_aqua=0 for m in "${modules[@]}"; do if [[ "$m" == "wayland-protocols-src" ]]; then - if [[ $inserted_wp -eq 0 ]]; then - tmp+=("wayland-protocols-src") - inserted_wp=1 + if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi + elif [[ "$m" == "hyprutils" ]]; then + if [[ $inserted_utils -eq 0 ]]; then + # ensure protocols before utils + if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi + tmp+=("hyprutils"); inserted_utils=1 + fi + elif [[ "$m" == "hyprlang" ]]; then + if [[ $inserted_lang -eq 0 ]]; then + # ensure utils before lang + if [[ $inserted_utils -eq 0 ]]; then + if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi + tmp+=("hyprutils"); inserted_utils=1 + fi + tmp+=("hyprlang"); inserted_lang=1 fi elif [[ "$m" == "aquamarine" ]]; then if [[ $inserted_aqua -eq 0 ]]; then - # ensure protocols before aquamarine - if [[ $inserted_wp -eq 0 ]]; then - tmp+=("wayland-protocols-src") - inserted_wp=1 + # ensure lang before aquamarine + if [[ $inserted_lang -eq 0 ]]; then + if [[ $inserted_utils -eq 0 ]]; then + if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi + tmp+=("hyprutils"); inserted_utils=1 + fi + tmp+=("hyprlang"); inserted_lang=1 fi - tmp+=("aquamarine") - inserted_aqua=1 + tmp+=("aquamarine"); inserted_aqua=1 fi elif [[ "$m" == "hyprland" ]]; then - # ensure protocols and aquamarine already present - if [[ $inserted_wp -eq 0 ]]; then - tmp+=("wayland-protocols-src") - inserted_wp=1 - fi - if [[ $inserted_aqua -eq 0 ]]; then - tmp+=("aquamarine") - inserted_aqua=1 - fi + # ensure all prerequisites already present + if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi + if [[ $inserted_utils -eq 0 ]]; then tmp+=("hyprutils"); inserted_utils=1; fi + if [[ $inserted_lang -eq 0 ]]; then tmp+=("hyprlang"); inserted_lang=1; fi + if [[ $inserted_aqua -eq 0 ]]; then tmp+=("aquamarine"); inserted_aqua=1; fi tmp+=("hyprland") else tmp+=("$m")