v3-revamp-fedroa

This commit is contained in:
2026-07-07 12:19:56 +02:00
parent 9f397457bb
commit 6f0113f280
+14 -32
View File
@@ -1,42 +1,20 @@
#!/bin/bash
set -euo pipefail
##########################
# Color helpers (printf-safe, no tput)
##########################
RED="\033[0;31m"
GREEN="\033[0;32m"
YELLOW="\033[0;33m"
CYAN="\033[0;36m"
GRAY="\033[0;37m"
BOLD="\033[1m"
RESET="\033[0m"
# Disable colors if output is not a terminal
if [ ! -t 1 ]; then
RED="" GREEN="" YELLOW="" CYAN="" GRAY="" BOLD="" RESET=""
fi
say_red() { printf "\n"; printf "%b%s%b\n" "$RED" "$*" "$RESET"; }
say_green() { printf "\n"; printf "%b%s%b\n" "$GREEN" "$*" "$RESET"; }
say_yellow() { printf "\n"; printf "%b%s%b\n" "$YELLOW" "$*" "$RESET"; }
say_cyan() { printf "\n"; printf "%b%s%b\n" "$CYAN" "$*" "$RESET"; }
say_gray() { printf "\n"; printf "%b%s%b\n" "$GRAY" "$*" "$RESET"; }
say_bold() { printf "\n"; printf "%b%s%b\n" "$BOLD" "$*" "$RESET"; }
##########################
# Use exported variables from main detection script
##########################
# Map the exported variables to your local names with fallbacks to satisfy set -u
OS="${DETECTED_OS:-fedora}"
DDE="${DETECTED_DE:-none}"
DE="${SELECTED_DE:-none}"
TWM="${SELECTED_TWM:-none}"
INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}"
INSTALL_LEVEL="${INSTALL_LEVEL:-full}"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
##########################
echo
color_cyan "Starting Fedora Full setup..."
echo
#------------------------------------------
# Helper functions
##########################
#------------------------------------------
install_packages() { sudo dnf install -y "$@"; }
is_package_installed() { rpm -q "$@" &>/dev/null; }
@@ -76,9 +54,9 @@ switch_display_manager() {
sudo systemctl set-default graphical.target
}
#########################
#------------------------------------------
# Start installation
##########################
#------------------------------------------
say_yellow "Starting Niri setup..."
CURRENT_DE="$(detect_de)"
@@ -101,6 +79,8 @@ add_terra_repo() {
fi
}
pause_if_debug
# Core components for Niri & Noctalia setup
NIRI_PACKAGES=(niri fuzzel swaybg swaylock noctalia-shell)
@@ -137,5 +117,7 @@ else
fi
fi
pause_if_debug
# End of script
say_green "Niri / SDDM setup completed."