updated since many conflicts
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
#!/bin/bash
|
||||
# 💫 https://github.com/JaKooLit 💫 #
|
||||
# XDG-Desktop-Portals #
|
||||
if [[ $USE_PRESET = [Yy] ]]; then
|
||||
source ./preset.sh
|
||||
fi
|
||||
# XDG-Desktop-Portals hyprland #
|
||||
|
||||
xdg=(
|
||||
xdg-desktop-portal-hyprland
|
||||
@@ -26,49 +23,9 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_xdph.log"
|
||||
|
||||
# XDG-DESKTOP-PORTAL-HYPRLAND
|
||||
printf "${NOTE} Installing ${SKY_BLUE}xdg-desktop-portal-hyprland${RESET}\n"
|
||||
for xdgs in "${xdg[@]}"; do
|
||||
install_package "$xdgs" 2>&1 | tee -a "$LOG"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "\e[1A\e[K${ERROR} - $xdph Package installation failed, Please check the installation logs"
|
||||
exit 1
|
||||
fi
|
||||
install_package "$xdgs" "$LOG"
|
||||
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}
|
||||
|
||||
Reference in New Issue
Block a user