some tweaking on install-scripts except the compiling part. It will not show progress for much cleaner work.

This commit is contained in:
JaKooLit
2025-02-02 22:54:58 +09:00
parent dac6c373c9
commit 6abc879468
25 changed files with 244 additions and 249 deletions

View File

@@ -1,6 +1,7 @@
#!/bin/bash
# 💫 https://github.com/JaKooLit 💫 #
# XDG-Desktop-Portals #
# XDG-Desktop-Portals hyprland #
if [[ $USE_PRESET = [Yy] ]]; then
source ./preset.sh
fi
@@ -27,48 +28,11 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_xdph.log"
# XDG-DESKTOP-PORTAL-HYPRLAND
for xdgs in "${xdg[@]}"; do
install_package "$xdgs" 2>&1 | tee -a "$LOG"
install_package "$xdgs" "$LOG"
if [ $? -ne 0 ]; then
echo -e "\e[1A\e[K${ERROR} - $xdph Package installation failed, Please check the installation logs"
exit 1
fi
done
printf "${NOTE} Checking for other XDG-Desktop-Portal-Implementations....\n"
sleep 1
printf "\n"
printf "${NOTE} XDG-desktop-portal-KDE & GNOME (if installed) should be manually disabled or removed! I can't remove it... sorry...\n"
while true; do
printf "\n%.0s" {1..2}
if [[ -z $XDPH1 ]]; then
read -rp "${CAT} Would you like to try to remove other XDG-Desktop-Portal-Implementations? (y/n) " XDPH1
fi
echo
sleep 1
case $XDPH1 in
[Yy])
# Clean out other portals
printf "${NOTE} Clearing any other xdg-desktop-portal implementations...\n"
# Check if packages are installed and uninstall if present
if pacman -Qs xdg-desktop-portal-wlr > /dev/null ; then
echo "Removing xdg-desktop-portal-wlr..."
sudo pacman -R --noconfirm xdg-desktop-portal-wlr 2>&1 | tee -a "$LOG"
fi
if pacman -Qs xdg-desktop-portal-lxqt > /dev/null ; then
echo "Removing xdg-desktop-portal-lxqt..."
sudo pacman -R --noconfirm xdg-desktop-portal-lxqt 2>&1 | tee -a "$LOG"
fi
break
;;
[Nn])
echo "no other XDG-implementations will be removed." >> "$LOG"
break
;;
*)
echo "Invalid input. Please enter 'y' for yes or 'n' for no."
;;
esac
done
clear
printf "\n%.0s" {1..2}