113 lines
2.8 KiB
Bash
Executable File
113 lines
2.8 KiB
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
# 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:-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; }
|
|
|
|
# Run minimal first
|
|
source "$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
|
|
|
|
pause_if_debug
|
|
|
|
# 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..."
|
|
|
|
# Move into the directory safely
|
|
cd "$REPO_DIR" || {
|
|
color_red "Error: Failed to enter $REPO_DIR"
|
|
exit 1
|
|
}
|
|
|
|
chmod +x install.sh
|
|
|
|
# Temporarily disable pipefail so SIGPIPE doesn't register as a fatal script crash
|
|
set +o pipefail
|
|
|
|
yes | ./install.sh
|
|
INSTALL_STATUS=$?
|
|
|
|
# Instantly restore pipefail for the remaining application scripts
|
|
set -o pipefail
|
|
|
|
# Verify the installer script's actual status code
|
|
if [ $INSTALL_STATUS -ne 0 ]; then
|
|
color_red "Error: SDDM theme installer encountered a genuine runtime issue."
|
|
exit 1
|
|
fi
|
|
|
|
color_green "SDDM theme installer completed successfully!"
|
|
|
|
pause_if_debug
|
|
|
|
# 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
|
|
|
|
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."
|