fix arch xfce + add arch plasma
This commit is contained in:
@@ -70,28 +70,42 @@ say_yellow -e "Starting XFCE installation..."
|
||||
CURRENT_DE="$(detect_de)"
|
||||
CURRENT_DM="$(detect_display_manager)"
|
||||
|
||||
if [[ -z "$CURRENT_DE" ]]; then
|
||||
say_cyan -e "No Desktop Environment detected. Installing XFCE (light setup with SDDM)..."
|
||||
if [[ -z "$CURRENT_DE" || "$CURRENT_DE" != "xfce" ]]; then
|
||||
say_cyan -e "XFCE4 not detected. Installing XFCE (light setup with SDDM)..."
|
||||
|
||||
install_packages sddm xfce4 xfce4-goodies
|
||||
enable_graphical_target
|
||||
|
||||
say_green -e "XFCE with SDDM installed successfully. You can reboot now to start XFCE."
|
||||
else
|
||||
say_cyan -e "Detected existing Desktop Environment: $CURRENT_DE"
|
||||
say_cyan -e "Detected existing Desktop Environment: $CURRENT_DE. Checking Display Manager..."
|
||||
|
||||
if [[ "$CURRENT_DM" == "lightdm" ]]; then
|
||||
say_yellow -e "LightDM is currently active. Replacing with SDDM..."
|
||||
# Check and replace other Display Managers if they conflict with the preferred SDDM setup
|
||||
if [[ "$CURRENT_DM" != "sddm" ]]; then
|
||||
say_yellow -e "Display manager **$CURRENT_DM** is currently active. Replacing with **SDDM**, the default for KDE Plasma..."
|
||||
|
||||
sudo systemctl disable lightdm
|
||||
sudo apt purge -y lightdm lightdm-gtk-greeter
|
||||
# Attempt to disable the old DM if detected
|
||||
if [ ! -z "$CURRENT_DM" ]; then
|
||||
sudo systemctl disable "$CURRENT_DM" || true
|
||||
fi
|
||||
|
||||
# Remove common alternative DMs if they exist to prevent conflicts
|
||||
if is_package_installed lightdm; then
|
||||
say_gray -e "Removing lightdm..."
|
||||
remove_packages lightdm lightdm-gtk-greeter || true
|
||||
fi
|
||||
if is_package_installed gdm; then
|
||||
say_gray -e "Removing gdm..."
|
||||
remove_packages gdm || true
|
||||
fi
|
||||
|
||||
# Ensure SDDM is installed and enabled
|
||||
install_packages sddm
|
||||
enable_graphical_target
|
||||
|
||||
say_green -e "LightDM removed and replaced with SDDM."
|
||||
say_green -e "Old display manager removed and replaced with SDDM."
|
||||
else
|
||||
say_cyan -e "Current display manager: ${CURRENT_DM:-none}. Leaving unchanged."
|
||||
say_cyan -e "Current display manager is already **SDDM**. Leaving unchanged."
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user