v3-revamp-fedroa

This commit is contained in:
2026-07-07 12:21:29 +02:00
parent 6f0113f280
commit 3493e9f136
+13 -13
View File
@@ -45,10 +45,10 @@ switch_display_manager() {
if [[ "$current_dm" != "$target_dm" ]]; then
if [[ -n "$current_dm" ]]; then
say_yellow "Disabling existing display manager: $current_dm"
color_yellow "Disabling existing display manager: $current_dm"
sudo systemctl disable "$current_dm"
fi
say_yellow "Enabling $target_dm..."
color_yellow "Enabling $target_dm..."
sudo systemctl enable "$target_dm"
fi
sudo systemctl set-default graphical.target
@@ -57,7 +57,7 @@ switch_display_manager() {
#------------------------------------------
# Start installation
#------------------------------------------
say_yellow "Starting Niri setup..."
color_yellow "Starting Niri setup..."
CURRENT_DE="$(detect_de)"
CURRENT_DM="$(detect_display_manager)"
@@ -65,17 +65,17 @@ CURRENT_DM="$(detect_display_manager)"
# Add Terra repo
add_terra_repo() {
if [ ! -f /etc/yum.repos.d/terra.repo ]; then
say_yellow "Adding Terra repository for Noctalia Shell..."
color_yellow "Adding Terra repository for Noctalia Shell..."
TMP_FILE="/tmp/terra.repo"
curl -fsSL https://github.com/terrapkg/subatomic-repos/raw/main/terra.repo -o "$TMP_FILE" &&
sudo mv "$TMP_FILE" /etc/yum.repos.d/terra.repo
say_yellow "Clearing DNF cache..."
color_yellow "Clearing DNF cache..."
sudo dnf clean metadata
else
say_gray "Terra repository already configured."
color_gray "Terra repository already configured."
fi
}
@@ -85,7 +85,7 @@ pause_if_debug
NIRI_PACKAGES=(niri fuzzel swaybg swaylock noctalia-shell)
if [[ -z "$CURRENT_DE" || "$CURRENT_DE" == "none" || "$CURRENT_DE" == "sway" ]]; then
say_cyan "No Desktop Environment detected. Installing Niri + Noctalia Shell..."
color_cyan "No Desktop Environment detected. Installing Niri + Noctalia Shell..."
# 1. Add the repo first
add_terra_repo
@@ -94,16 +94,16 @@ if [[ -z "$CURRENT_DE" || "$CURRENT_DE" == "none" || "$CURRENT_DE" == "sway" ]];
install_packages sddm "${NIRI_PACKAGES[@]}"
switch_display_manager "sddm"
say_green "Niri, Noctalia, and SDDM installed successfully."
color_green "Niri, Noctalia, and SDDM installed successfully."
else
say_cyan "Detected existing Desktop Environment: $CURRENT_DE"
color_cyan "Detected existing Desktop Environment: $CURRENT_DE"
# Always install the window manager packages
install_packages "${NIRI_PACKAGES[@]}"
if [[ "$CURRENT_DM" == "lightdm" ]]; then
say_yellow "LightDM is currently active. Replacing with SDDM..."
color_yellow "LightDM is currently active. Replacing with SDDM..."
# Fedora equivalent to purge lightdm safely
sudo dnf remove -y lightdm lightdm-gtk
@@ -111,13 +111,13 @@ else
install_packages sddm
switch_display_manager "sddm"
say_green "LightDM removed and replaced with SDDM."
color_green "LightDM removed and replaced with SDDM."
else
say_cyan "Current display manager: ${CURRENT_DM:-none}. Leaving it to handle Niri login sessions."
color_cyan "Current display manager: ${CURRENT_DM:-none}. Leaving it to handle Niri login sessions."
fi
fi
pause_if_debug
# End of script
say_green "Niri / SDDM setup completed."
color_green "Niri / SDDM setup completed."