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
+19 -29
View File
@@ -1,46 +1,26 @@
#!/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
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}"
DDE="${DETECTED_DE:-}"
# Map the exported variables to your local names with fallbacks to satisfy set -u
OS="${DETECTED_OS:-fedora}"
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; }
color_yellow "Starting full setup..."
# Run minimal first
bash "$SCRIPT_DIR/fedora-minimal.sh"
@@ -51,6 +31,8 @@ install_packages arandr catfish galculator NetworkManager network-manager-applet
# temp disabled packages
# xfce4-indicator-plugin
pause_if_debug
# install SDDM-theme
color_yellow "Installing SDDM Theme"
@@ -74,6 +56,8 @@ cd "$REPO_DIR" || {
exit 1
}
pause_if_debug
# Ensure NetworkManager manages all interfaces
color_yellow "Ensuring NetworkManager service is enabled and running..."
sudo systemctl enable --now NetworkManager
@@ -93,12 +77,18 @@ sudo systemctl restart NetworkManager
color_yellow "Waiting for NetworkManager to reconnect..."
sleep 15
pause_if_debug
# Enable pipewire
systemctl --user enable pipewire pipewire-pulse wireplumber
pause_if_debug
# replace bashrc
color_yellow "making backup of bashrc"
sudo cp -v /etc/skel/.bashrc /etc/skel/.bashrc.starburst
pause_if_debug
# End of script
color_green "Full setup completed."