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 #!/bin/bash
set -euo pipefail set -euo pipefail
#------------------------------------------ # Source parent definitions (adjust path if needed)
# Color helpers (printf-safe, no tput) source "$(dirname "$0")/../main_script.sh"
#------------------------------------------
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 # Map the exported variables to your local names with fallbacks to satisfy set -u
if [ ! -t 1 ]; then OS="${DETECTED_OS:-fedora}"
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:-}"
DE="${SELECTED_DE:-none}" DE="${SELECTED_DE:-none}"
TWM="${SELECTED_TWM:-none}" TWM="${SELECTED_TWM:-none}"
INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" INSTALL_LEVEL="${INSTALL_LEVEL:-full}"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo
color_cyan "Starting Fedora Full setup..."
echo
#------------------------------------------ #------------------------------------------
# Helper functions # Helper functions
#------------------------------------------ #------------------------------------------
install_packages() { sudo dnf install -y "$@"; } install_packages() { sudo dnf install -y "$@"; }
is_package_installed() { rpm -q "$@" &>/dev/null; } is_package_installed() { rpm -q "$@" &>/dev/null; }
color_yellow "Starting full setup..."
# Run minimal first # Run minimal first
bash "$SCRIPT_DIR/fedora-minimal.sh" bash "$SCRIPT_DIR/fedora-minimal.sh"
@@ -51,6 +31,8 @@ install_packages arandr catfish galculator NetworkManager network-manager-applet
# temp disabled packages # temp disabled packages
# xfce4-indicator-plugin # xfce4-indicator-plugin
pause_if_debug
# install SDDM-theme # install SDDM-theme
color_yellow "Installing SDDM Theme" color_yellow "Installing SDDM Theme"
@@ -74,6 +56,8 @@ cd "$REPO_DIR" || {
exit 1 exit 1
} }
pause_if_debug
# Ensure NetworkManager manages all interfaces # Ensure NetworkManager manages all interfaces
color_yellow "Ensuring NetworkManager service is enabled and running..." color_yellow "Ensuring NetworkManager service is enabled and running..."
sudo systemctl enable --now NetworkManager sudo systemctl enable --now NetworkManager
@@ -93,12 +77,18 @@ sudo systemctl restart NetworkManager
color_yellow "Waiting for NetworkManager to reconnect..." color_yellow "Waiting for NetworkManager to reconnect..."
sleep 15 sleep 15
pause_if_debug
# Enable pipewire # Enable pipewire
systemctl --user enable pipewire pipewire-pulse wireplumber systemctl --user enable pipewire pipewire-pulse wireplumber
pause_if_debug
# replace bashrc # replace bashrc
color_yellow "making backup of bashrc" color_yellow "making backup of bashrc"
sudo cp -v /etc/skel/.bashrc /etc/skel/.bashrc.starburst sudo cp -v /etc/skel/.bashrc /etc/skel/.bashrc.starburst
pause_if_debug
# End of script # End of script
color_green "Full setup completed." color_green "Full setup completed."
+31 -27
View File
@@ -1,44 +1,40 @@
#!/bin/bash #!/bin/bash
set -euo pipefail set -euo pipefail
#------------------------------------------ # Source parent definitions (adjust path if needed)
# Color helpers (printf-safe, no tput) source "$(dirname "$0")/../main_script.sh"
#------------------------------------------
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 # Map the exported variables to your local names with fallbacks to satisfy set -u
if [ ! -t 1 ]; then OS="${DETECTED_OS:-fedora}"
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:-unknown}"
DDE="${DETECTED_DE:-unknown}"
DE="${SELECTED_DE:-none}" DE="${SELECTED_DE:-none}"
TWM="${SELECTED_TWM:-none}" TWM="${SELECTED_TWM:-none}"
SYS_INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo
color_cyan "Starting Fedora Minimal setup..."
echo
#------------------------------------------ #------------------------------------------
# Helper functions # Helper functions
#------------------------------------------ #------------------------------------------
install_packages() { sudo dnf install -y "$@"; } install_packages() { sudo dnf install -y "$@"; }
is_package_installed() { rpm -q "$@" &>/dev/null; } is_package_installed() { rpm -q "$@" &>/dev/null; }
remove_packages() {
local packages_to_remove=()
for pkg in "$@"; do
if is_package_installed "$pkg"; then
packages_to_remove+=("$pkg")
fi
done
if [ ${#packages_to_remove[@]} -gt 0 ]; then
color_cyan "Removing packages: ${packages_to_remove[*]}"
sudo dnf remove -y "${packages_to_remove[@]}"
fi
}
#------------------------------------------ #------------------------------------------
# 1. Base Dependencies & Repos # 1. Base Dependencies & Repos
#------------------------------------------ #------------------------------------------
@@ -46,6 +42,8 @@ color_cyan; echo "Installing base dependencies..."
# dnf-plugins-core is required for COPR # dnf-plugins-core is required for COPR
install_packages dnf-plugins-core wget install_packages dnf-plugins-core wget
pause_if_debug
#------------------------------------------ #------------------------------------------
# 2. Main Package Installation # 2. Main Package Installation
#------------------------------------------ #------------------------------------------
@@ -63,6 +61,8 @@ install_packages \
powertop inxi acpi plocate nm-connection-editor \ powertop inxi acpi plocate nm-connection-editor \
python3-pylint qt6-qtsvg qt6-qtvirtualkeyboard qt6-qtmultimedia python3-pylint qt6-qtsvg qt6-qtvirtualkeyboard qt6-qtmultimedia
pause_if_debug
# 2. Inject the correct Polkit agent & PeaZip based on environment # 2. Inject the correct Polkit agent & PeaZip based on environment
color_cyan; echo "Tailoring toolkits for $DE / $TWM..." color_cyan; echo "Tailoring toolkits for $DE / $TWM..."
if [[ "$DE" == "plasma" || "$TWM" == "hyprland" ]]; then if [[ "$DE" == "plasma" || "$TWM" == "hyprland" ]]; then
@@ -77,6 +77,8 @@ if ! command -v starship &> /dev/null; then
curl -sS https://starship.rs/install.sh | sh -s -- -y curl -sS https://starship.rs/install.sh | sh -s -- -y
fi fi
pause_if_debug
#------------------------------------------ #------------------------------------------
# 3. Fonts (RobotoMono Nerd Font) # 3. Fonts (RobotoMono Nerd Font)
#------------------------------------------ #------------------------------------------
@@ -95,6 +97,8 @@ else
color_yellow; echo "RobotoMono Nerd Font already installed." color_yellow; echo "RobotoMono Nerd Font already installed."
fi fi
pause_if_debug
#------------------------------------------ #------------------------------------------
# 4. Enable Services # 4. Enable Services
#------------------------------------------ #------------------------------------------
+18 -29
View File
@@ -1,39 +1,20 @@
#!/bin/bash #!/bin/bash
set -euo pipefail set -euo pipefail
#------------------------------------------ # Source parent definitions (adjust path if needed)
# Color helpers (printf-safe, no tput) source "$(dirname "$0")/../main_script.sh"
#------------------------------------------
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 # Map the exported variables to your local names with fallbacks to satisfy set -u
if [ ! -t 1 ]; then OS="${DETECTED_OS:-fedora}"
RED="" GREEN="" YELLOW="" CYAN="" GRAY="" BOLD="" RESET="" DE="${SELECTED_DE:-xfce}"
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}"
TWM="${SELECTED_TWM:-none}" TWM="${SELECTED_TWM:-none}"
SYS_INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo
color_cyan "Starting Fedora XFCE setup..."
echo
#------------------------------------------ #------------------------------------------
# Helper functions # Helper functions
#------------------------------------------ #------------------------------------------
@@ -101,6 +82,8 @@ else
fi fi
fi fi
pause_if_debug
#------------------------------------------ #------------------------------------------
# XFCE-specific configuration # XFCE-specific configuration
#------------------------------------------ #------------------------------------------
@@ -114,6 +97,8 @@ if [[ "${DE}" == "xfce" || "${DDE}" == "xfce" ]]; then
install_packages xfce4-settings install_packages xfce4-settings
fi fi
pause_if_debug
# Set fonts via xfconf-query # Set fonts via xfconf-query
if command -v xfconf-query >/dev/null 2>&1; then if command -v xfconf-query >/dev/null 2>&1; then
# Interface font (UI) # 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)." color_yellow "xfconf-query not found — skipping XFCE font config (will apply at first login)."
fi fi
pause_if_debug
# Set default terminal to Alacritty # Set default terminal to Alacritty
if command -v alacritty >/dev/null 2>&1; then if command -v alacritty >/dev/null 2>&1; then
mkdir -p "$HOME/.config/xfce4" mkdir -p "$HOME/.config/xfce4"
@@ -150,5 +137,7 @@ if [[ "${DE}" == "xfce" || "${DDE}" == "xfce" ]]; then
fi fi
fi fi
pause_if_debug
# End of script # End of script
color_green "XFCE / SDDM setup completed." color_green "XFCE / SDDM setup completed."