v3_reorder files

This commit is contained in:
2026-07-06 11:19:12 +02:00
parent d42e1bf7af
commit 86c8d48fc4
28 changed files with 0 additions and 0 deletions
+170
View File
@@ -0,0 +1,170 @@
#!/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
##########################
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; }
say_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
say_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
say_yellow "Ensuring NetworkManager service is enabled and running..."
sudo systemctl enable --now NetworkManager
say_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
say_yellow "Restarting NetworkManager service..."
sudo systemctl restart NetworkManager
say_yellow "Waiting for NetworkManager to reconnect..."
sleep 15
# Enable pipewire
systemctl --user enable pipewire pipewire-pulse wireplumber
########################################
# XFCE-specific configuration
########################################
if [[ "${DE}" == "xfce" || "${DDE}" == "xfce" ]]; then
echo
say_cyan "Applying XFCE defaults: fonts, browser, and terminal..."
# Ensure xfconf-query exists (for XFCE settings)
if ! command -v xfconf-query >/dev/null 2>&1; then
say_yellow "xfconf-query not found — installing xfce4-settings..."
install_packages xfce4-settings
fi
# set fonts
# Wait for xfconf to be available (only needed if running inside the same session)
if command -v xfconf-query >/dev/null 2>&1; then
# Interface font (UI)
xfconf-query -c xsettings -p /Gtk/FontName -s "RobotoMono Nerd Font Regular 10"
# Monospace font (terminals, editors)
xfconf-query -c xsettings -p /Gtk/MonospaceFontName -s "RobotoMono Nerd Font Mono Regular 10"
say_green "XFCE fonts updated successfully!"
else
say_yellow "xfconf-query not found — skipping XFCE font config (will apply at first login)."
fi
# Set browser default
if command -v chromium >/dev/null 2>&1; then
mkdir -p "$HOME/.config/xfce4/"
HELPERS_FILE="$HOME/.config/xfce4/helpers.rc"
# Ensure the helpers file exists
touch "$HELPERS_FILE"
# Update or insert browser entry
if grep -q '^WebBrowser=' "$HELPERS_FILE"; then
sed -i 's|^WebBrowser=.*|WebBrowser=chromium|' "$HELPERS_FILE"
else
echo "WebBrowser=chromium" >> "$HELPERS_FILE"
fi
say_green "XFCE defeault browser set to chromium!"
fi
# Set default terminal
if command -v alacritty >/dev/null 2>&1; then
mkdir -p "$HOME/.config/xfce4/"
HELPERS_FILE="$HOME/.config/xfce4/helpers.rc"
touch "$HELPERS_FILE"
# TerminalEmulator entry
if grep -q '^TerminalEmulator=' "$HELPERS_FILE"; then
sed -i 's|^TerminalEmulator=.*|TerminalEmulator=alacritty|' "$HELPERS_FILE"
else
echo "TerminalEmulator=alacritty" >> "$HELPERS_FILE"
fi
# TerminalEmulatorCommand entry
if grep -q '^TerminalEmulatorCommand=' "$HELPERS_FILE"; then
sed -i 's|^TerminalEmulatorCommand=.*|TerminalEmulatorCommand=alacritty|' "$HELPERS_FILE"
else
echo "TerminalEmulatorCommand=alacritty" >> "$HELPERS_FILE"
fi
say_green "XFCE defeault terminal set to alacritty!"
fi
fi
# replace bashrc
say_yellow "making backup of bashrc"
sudo cp -v /etc/skel/.bashrc /etc/skel/.bashrc.starburst
# End of script
say_green "Full setup completed."
+125
View File
@@ -0,0 +1,125 @@
#!/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
##########################
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; }
##########################
# 1. Base Dependencies & Repos
##########################
say_cyan "Installing base dependencies..."
# dnf-plugins-core is required for COPR
install_packages dnf-plugins-core curl wget git flatpak
# Enable PeaZip via COPR
say_cyan "Installing PeaZip (Qt6) via official RPM..."
PZ_VER="11.0.0"
PZ_FILE="peazip-${PZ_VER}.LINUX.Qt6-1.x86_64.rpm"
PZ_URL="https://github.com/peazip/PeaZip/releases/download/${PZ_VER}/${PZ_FILE}"
curl -L "$PZ_URL" -o "/tmp/$PZ_FILE"
sudo dnf install -y "/tmp/$PZ_FILE"
rm "/tmp/$PZ_FILE"
say_green "PeaZip ${PZ_VER} (Qt6) installed successfully."
##########################
# 2. Main Package Installation
##########################
say_yellow "Installing essential tools..."
install_packages \
fastfetch lolcat bash-completion alacritty \
hwinfo lshw duf chrony polkit-kde-agent-1 \
man-db tree xdg-user-dirs rsync time bat chromium \
thunar thunar-archive-plugin thunar-volman \
baobab gvfs-smb hddtemp squashfs-tools \
zip gzip p7zip unace unrar file-roller peazip \
feh gnome-font-viewer dconf-editor hardinfo2 lsb_release \
powertop inxi acpi plocate nm-connection-editor \
python3-pylint qt6-qtsvg qt6-qtvirtualkeyboard qt6-qtmultimedia
if ! command -v starship &> /dev/null; then
say_cyan "Installing Starship shell prompt..."
curl -sS https://starship.rs/install.sh | sh -s -- -y
fi
#################################
# 3. Fonts (RobotoMono Nerd Font)
#################################
FONT_DIR="$HOME/.local/share/fonts"
DOWNLOAD_NAME="RobotoMono"
if ! find "$FONT_DIR" -name "*RobotoMonoNerdFont*" | grep -q .; then
say_yellow "Installing ${DOWNLOAD_NAME} Nerd Font..."
mkdir -p "$FONT_DIR"
FONT_ZIP="/tmp/${DOWNLOAD_NAME}.zip"
curl -L "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/${DOWNLOAD_NAME}.zip" -o "$FONT_ZIP"
unzip -oq "$FONT_ZIP" -d "$FONT_DIR"
fc-cache -fv
rm "$FONT_ZIP"
say_green "${DOWNLOAD_NAME} installed."
else
say_yellow "RobotoMono Nerd Font already installed."
fi
#################################
# 4. Chromium Configuration
#################################
CONF="$HOME/.config/chromium-flags.conf"
mkdir -p "$(dirname "$CONF")"
[[ ! -f "$CONF" ]] && touch "$CONF"
# Add OAuth IDs for Google Sync
#
OAUTH_ID="--oauth2-client-id=77185425430.apps.googleusercontent.com"
OAUTH_SECRET="--oauth2-client-secret=OTJgUOQcT7lO7GsGZq2G4IlT"
grep -qxF -- "$OAUTH_ID" "$CONF" || echo "$OAUTH_ID" >> "$CONF"
grep -qxF -- "$OAUTH_SECRET" "$CONF" || echo "$OAUTH_SECRET" >> "$CONF"
say_green "Chromium flags configured."
#################################
# 5. Enable Services
#################################
# Enable basic services
say_cyan "Enabling services..."
sudo systemctl enable --now fstrim.timer
sudo systemctl enable --now chronyd || true
say_green "Fedora Minimal setup completed."
+141
View File
@@ -0,0 +1,141 @@
#!/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
##########################
OS="${DETECTED_OS:-fedora}"
DDE="${DETECTED_DE:-none}"
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; }
detect_de() {
# Check if a desktop session is currently running or XFCE is available
if [ "${XDG_CURRENT_DESKTOP:-}" ]; then
echo "${XDG_CURRENT_DESKTOP,,}" # lowercase the output
elif command -v xfce4-session >/dev/null 2>&1; then
echo "xfce"
else
echo ""
fi
}
detect_display_manager() {
# Fedora/Systemd way to check the active DM symlink
if [ -L /etc/systemd/system/display-manager.service ]; then
basename "$(readlink /etc/systemd/system/display-manager.service)" | sed 's/\.service//'
else
echo ""
fi
}
switch_display_manager() {
local target_dm="$1"
local current_dm
current_dm=$(detect_display_manager)
if [[ "$current_dm" != "$target_dm" ]]; then
if [[ -n "$current_dm" ]]; then
say_yellow "Disabling existing display manager: $current_dm"
sudo systemctl disable "$current_dm"
fi
say_yellow "Enabling $target_dm..."
sudo systemctl enable "$target_dm"
fi
sudo systemctl set-default graphical.target
}
#########################
# Start installation
##########################
say_yellow "Starting Niri setup..."
CURRENT_DE="$(detect_de)"
CURRENT_DM="$(detect_display_manager)"
# Add Terra repo
add_terra_repo() {
if [ ! -f /etc/yum.repos.d/terra.repo ]; then
say_yellow "Adding Terra repository for Noctalia Shell..."
TMP_FILE="/tmp/terra.repo"
curl -fsSL https://github.com/terrapkg/subatomic-repos/raw/main/terra.repo -o "$TMP_FILE" &&
sudo mv "$TMP_FILE" /etc/yum.repos.d/terra.repo
say_yellow "Clearing DNF cache..."
sudo dnf clean metadata
else
say_gray "Terra repository already configured."
fi
}
# Core components for Niri & Noctalia setup
NIRI_PACKAGES=(niri fuzzel swaybg swaylock noctalia-shell)
if [[ -z "$CURRENT_DE" || "$CURRENT_DE" == "none" || "$CURRENT_DE" == "sway" ]]; then
say_cyan "No Desktop Environment detected. Installing Niri + Noctalia Shell..."
# 1. Add the repo first
add_terra_repo
# 2. Install everything
install_packages sddm "${NIRI_PACKAGES[@]}"
switch_display_manager "sddm"
say_green "Niri, Noctalia, and SDDM installed successfully."
else
say_cyan "Detected existing Desktop Environment: $CURRENT_DE"
# Always install the window manager packages
install_packages "${NIRI_PACKAGES[@]}"
if [[ "$CURRENT_DM" == "lightdm" ]]; then
say_yellow "LightDM is currently active. Replacing with SDDM..."
# Fedora equivalent to purge lightdm safely
sudo dnf remove -y lightdm lightdm-gtk
install_packages sddm
switch_display_manager "sddm"
say_green "LightDM removed and replaced with SDDM."
else
say_cyan "Current display manager: ${CURRENT_DM:-none}. Leaving it to handle Niri login sessions."
fi
fi
# End of script
say_green "Niri / SDDM setup completed."
+89
View File
@@ -0,0 +1,89 @@
#!/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
##########################
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; }
say_yellow "Starting Workstation setup..."
# Run full first
bash "$SCRIPT_DIR/fedora-full.sh"
# Add extra packages
install_packages git libreoffice
# gitahead-git
# editors
install_packages konsole
# temp removed packages:
# sublime-text-4 vscodium
flatpak install -y flathub com.vscodium.codium
#internet
# install_packages
# temp removed packages
# google-chrome discord firefox insync brave-bin
#theming
# variety
#media
install_packages mpv
# temp removed packages
# vlc gimp inkscape spotify lollypop mpv-full mpv-git flameshot-git
#shells
install_packages zsh zsh-syntax-highlighting
# temp removed packages
# fish oh-my-zsh-git zsh-completions
#system-tools
install_packages @development-tools git curl wget cmake ninja-build pkgconf-pkg-config
#tools
install_packages system-config-printer system-config-printer-applet system-config-printer-libs ripgrep meld btop htop hwinfo lshw
# temp removed packages
# wttr
# End of script
say_green "Workstation setup completed."
###### TODO
### autostart flameshot tray icon
### autostart insync tray icon
+218
View File
@@ -0,0 +1,218 @@
#!/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
##########################
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)"
echo
say_cyan "Starting Fedora setup..."
echo
say_gray "DE: $DE, TWM: $TWM, Install Level: $INSTALL_LEVEL"
##########################
# Helper functions
##########################
install_packages() { sudo dnf install -y "$@"; }
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
say_cyan "Removing packages: ${packages_to_remove[*]}"
sudo dnf remove -y "${packages_to_remove[@]}"
fi
}
##########################
# 0. Ensure base is ready for installation
##########################
installed_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
pkg_dir="packages"
if [[ ! -d "$pkg_dir" ]]; then
say_red "Directory not found: $pkg_dir"
exit 1
fi
if ! command -v curl >/dev/null 2>&1; then
say_yellow "curl is not installed. Installing..."
install_packages curl
fi
##########################
# 1. Update and Enable Repos
##########################
say_cyan "Optimizing DNF for speed..."
# 1. Enable fastest mirror (lowest latency)
# 2. Increase parallel downloads (allows downloading multiple packages at once)
# 3. Set a minimum rate to drop slow mirrors automatically
sudo dnf config-manager setopt fastestmirror=1
sudo dnf config-manager setopt max_parallel_downloads=20
say_green "DNF optimized. Refreshing metadata..."
sudo dnf makecache --refresh
say_cyan "Enabling RPM Fusion repositories for Fedora $(rpm -E %fedora)..."
# Define the version variable for readability
FEDORA_VER=$(rpm -E %fedora)
say_yellow "Checking for updates and sources..."
sudo dnf check-update || true
# Check if flatpak is installed, if not, install it
if ! command -v flatpak &> /dev/null; then
say_yellow "Flatpak not found. Installing..."
sudo dnf install -y flatpak
fi
say_cyan "Enabling Flathub..."
# Using --if-not-exists is good practice to prevent errors on re-runs
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
sudo dnf install -y \
"https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-${FEDORA_VER}.noarch.rpm" \
"https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-${FEDORA_VER}.noarch.rpm"
say_cyan "Enabling full Flathub support..."
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
# Update the system
say_gray "Updating the system"
echo
sudo dnf update -y
##########################
# 2. Fix missing console font
##########################
say_yellow "Fix missing console font"
if grep -q FONT= /etc/vconsole.conf; then
say_green "Font is already set in /etc/vconsole.conf"
else
say_green "Setting console font in /etc/vconsole.conf"
echo 'FONT=gr737c-8x14' | sudo tee -a /etc/vconsole.conf
fi
##########################
# 3. Detected OS / DE / TWM info
##########################
say_yellow "Detected OS / Desktop Environment / Tiling Window Manager"
echo
say_gray "Installing OS-specific packages..."
say_gray "Selected DE: $DE"
say_gray "Selected TWM: $TWM"
say_gray "Installation Level: $INSTALL_LEVEL"
##########################
# 4. Desktop Environment installation
##########################
case "$DE" in
xfce|plasma|gnome)
say_yellow "Preparing to install $DE..."
SCRIPT_NAME="$SCRIPT_DIR/${OS}-${DE}.sh"
if [[ -f "$SCRIPT_NAME" ]]; then
say_cyan "Running $SCRIPT_NAME..."
bash "$SCRIPT_NAME"
else
say_red "Error: $SCRIPT_NAME not found!"
exit 1
fi
;;
none)
say_gray "No Desktop Environment selected, skipping DE installation."
;;
esac
##########################
# 5. Tiling Window Manager installation
##########################
case "$TWM" in
chadwm|hyprland|niri)
say_yellow "Installing $TWM..."
SCRIPT_NAME="$SCRIPT_DIR/${OS}-${TWM}.sh"
if [[ -f "$SCRIPT_NAME" ]]; then
say_cyan "Running $SCRIPT_NAME..."
bash "$SCRIPT_NAME"
else
say_red "Error: $SCRIPT_NAME not found!"
exit 1
fi
;;
none)
say_gray "No tiling window manager selected, skipping TWM installation."
;;
esac
##########################
# 6. Installation level handling
##########################
case "$INSTALL_LEVEL" in
minimal|full|workstation|server)
say_cyan "Installation level: $INSTALL_LEVEL"
SCRIPT_NAME="$SCRIPT_DIR/${OS}-${INSTALL_LEVEL}.sh"
if [[ -f "$SCRIPT_NAME" ]]; then
say_cyan "Running $SCRIPT_NAME..."
bash "$SCRIPT_NAME"
else
say_red "Error: $SCRIPT_NAME not found!"
exit 1
fi
;;
esac
say_green "Fedora setup complete."
say_red "The installation has finished. A reboot is recommended."
# Reboots are dangerous to automate; we use a shorter timeout and default to No
if read -t 10 -rp "Reboot now? [y/N]: " reboot_choice; then
case "${reboot_choice,,}" in
y|yes)
say_red "Rebooting now."
sudo reboot
;;
*)
say_yellow "Skipping reboot."
exit 0
;;
esac
else
say_yellow "\nNo input detected. Skipping reboot for safety."
exit 0
fi