#!/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 color_yellow() { printf '%b' "$YELLOW"; } color_cyan() { printf '%b' "$CYAN"; } color_red() { printf '%b' "$RED"; } color_green() { printf '%b' "$GREEN"; } color_gray() { printf '%b' "$GRAY"; } color_reset() { printf '%b' "$RESET"; } #------------------------------------------ # Use exported variables from main detection script #------------------------------------------ OS="${DETECTED_OS}" DDE="${DETECTED_DE:-}" DE="${SELECTED_DE:-none}" TWM="${SELECTED_TWM:-none}" INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" #------------------------------------------ # 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" # Add extra packages install_packages arandr catfish galculator NetworkManager network-manager-applet \ NetworkManager-openvpn numlockx pipewire pipewire-alsa pipewire-pulse \ wireplumber pavucontrol playerctl gparted xfce4-pulseaudio-plugin xfce4-clipman-plugin # temp disabled packages # xfce4-indicator-plugin # install SDDM-theme color_yellow "Installing SDDM Theme" GIT_DIR="$HOME/git" REPO_DIR="$GIT_DIR/SilentSDDM" REPO_URL="https://github.com/uiriansan/SilentSDDM" mkdir -p "$GIT_DIR" if [ -d "$REPO_DIR/.git" ]; then echo "SilentSDDM already exists. Updating repository..." cd "$REPO_DIR" && git pull --rebase else echo "Cloning SilentSDDM..." git clone -b main --depth=1 "$REPO_URL" "$REPO_DIR" fi echo "Running installer..." cd "$REPO_DIR" || { echo "Error: Failed to enter $REPO_DIR" >&2 exit 1 } # Ensure NetworkManager manages all interfaces color_yellow "Ensuring NetworkManager service is enabled and running..." sudo systemctl enable --now NetworkManager color_yellow "Setting NetworkManager to globally manage all devices..." sudo tee /etc/NetworkManager/conf.d/10-globally-managed-devices.conf > /dev/null <<'EOF' [ifupdown] managed=true [keyfile] unmanaged-devices= EOF color_yellow "Restarting NetworkManager service..." sudo systemctl restart NetworkManager color_yellow "Waiting for NetworkManager to reconnect..." sleep 15 # Enable pipewire systemctl --user enable pipewire pipewire-pulse wireplumber # replace bashrc color_yellow "making backup of bashrc" sudo cp -v /etc/skel/.bashrc /etc/skel/.bashrc.starburst # End of script color_green "Full setup completed."