v3-revamp-fedora

This commit is contained in:
2026-07-06 17:22:03 +02:00
parent 3509d25072
commit e2a84e8c48
3 changed files with 68 additions and 85 deletions
+18 -29
View File
@@ -1,39 +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"
# Source parent definitions (adjust path if needed)
source "$(dirname "$0")/../main_script.sh"
# Disable colors if output is not a terminal
if [ ! -t 1 ]; then
RED="" GREEN="" YELLOW="" CYAN="" GRAY="" BOLD="" RESET=""
fi
# Updated functions to cleanly accept and print text strings
color_yellow() { printf "%b%s%b\n" "$YELLOW" "$*" "$RESET"; }
color_cyan() { printf "%b%s%b\n" "$CYAN" "$*" "$RESET"; }
color_red() { printf "%b%s%b\n" "$RED" "$*" "$RESET"; }
color_green() { printf "%b%s%b\n" "$GREEN" "$*" "$RESET"; }
color_gray() { printf "%b%s%b\n" "$GRAY" "$*" "$RESET"; }
#------------------------------------------
# Use exported variables from main detection script
#------------------------------------------
OS="${DETECTED_OS:-unknown}"
DDE="${DETECTED_DE:-unknown}"
DE="${SELECTED_DE:-none}"
# Map the exported variables to your local names with fallbacks to satisfy set -u
OS="${DETECTED_OS:-fedora}"
DE="${SELECTED_DE:-xfce}"
TWM="${SELECTED_TWM:-none}"
SYS_INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}"
INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo
color_cyan "Starting Fedora XFCE setup..."
echo
#------------------------------------------
# Helper functions
#------------------------------------------
@@ -101,6 +82,8 @@ else
fi
fi
pause_if_debug
#------------------------------------------
# XFCE-specific configuration
#------------------------------------------
@@ -114,6 +97,8 @@ if [[ "${DE}" == "xfce" || "${DDE}" == "xfce" ]]; then
install_packages xfce4-settings
fi
pause_if_debug
# Set fonts via xfconf-query
if command -v xfconf-query >/dev/null 2>&1; then
# Interface font (UI)
@@ -126,6 +111,8 @@ if [[ "${DE}" == "xfce" || "${DDE}" == "xfce" ]]; then
color_yellow "xfconf-query not found — skipping XFCE font config (will apply at first login)."
fi
pause_if_debug
# Set default terminal to Alacritty
if command -v alacritty >/dev/null 2>&1; then
mkdir -p "$HOME/.config/xfce4"
@@ -150,5 +137,7 @@ if [[ "${DE}" == "xfce" || "${DDE}" == "xfce" ]]; then
fi
fi
pause_if_debug
# End of script
color_green "XFCE / SDDM setup completed."