diff --git a/install-scripts/hyprland.sh b/install-scripts/hyprland.sh index e0db20b..421055a 100644 --- a/install-scripts/hyprland.sh +++ b/install-scripts/hyprland.sh @@ -43,7 +43,13 @@ install_package() { } # Removing outdated Hyprland from extra repo to avoid conflict -sudo pacman -R hyprland --noconfirm "$1" 2>&1 | tee -a "$LOG" +printf "${YELLOW} Checking for other hyprland packages and remove if any..${RESET}\n" +if pacman -Qs hyprland > /dev/null; then + printf "${YELLOW} Hyprland detected. uninstalling to install Hyprland-git...${RESET}\n" + for hyprnvi in hyprland hyprland-nvidia hyprland-nvidia-git hyprland-nvidia-hidpi-git; do + sudo pacman -R --noconfirm "$hyprnvi" 2>/dev/null | tee -a "$LOG" || true + done +fi # Hyprland printf "${NOTE} Installing Hyprland Packages...\n"