From a4f16e24cb89fdecd46dc17e16ac3adff51dba78 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sun, 9 Feb 2025 10:35:55 +0900 Subject: [PATCH] fixed sddm theme.sh --- install.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/install.sh b/install.sh index 50e446b..ff52a97 100755 --- a/install.sh +++ b/install.sh @@ -223,7 +223,21 @@ ask_yes_no "-Install ${YELLOW}AGS (aylur's GTK shell) v1${RESET} for Desktop-Lik printf "\n" ask_yes_no "-Install & configure ${YELLOW}SDDM${RESET} as login manager?" sddm +# check if any known login managers are active when users choose to install sddm +if [ "$sddm" == "y" ] || [ "$sddm" == "Y" ]; then + # List of services to check + services=("gdm.service" "gdm3.service" "lightdm.service" "lxdm.service") + # Loop through each service + for svc in "${services[@]}"; do + if systemctl is-active --quiet "$svc"; then + echo "${ERROR} ${MAGENTA}$svc${RESET} is active. stop or disable it first or ${YELLOW}DO NOT choose SDDM${RESET} to install." + echo "${NOTE} If you have GDM, no need to install SDDM. GDM will work fine as Login Manager for Hyprland." + printf "\n%.0s" {1..2} + exit 1 + fi + done +fi if [[ "$sddm" == "Y" ]]; then ask_yes_no "-Download and Install ${YELLOW}SDDM Theme?${RESET} " sddm_theme fi