144 lines
3.2 KiB
Bash
Executable File
144 lines
3.2 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
|
|
# temp disabled packages
|
|
|
|
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
|
|
|
|
# replace bashrc
|
|
color_yellow "making backup of bashrc"
|
|
sudo cp -v /etc/skel/.bashrc /etc/skel/.bashrc.starburst
|
|
|
|
pause_if_debug
|
|
|
|
# Add workstation repo
|
|
sudo dnf install -y fedora-workstation-repositories
|
|
|
|
color_cyan "Install Office packages"
|
|
install_packages libreoffice
|
|
|
|
pause_if_debug
|
|
|
|
color_cyan "Install editors packages"
|
|
# temp removed packages:
|
|
# sublime-text-4
|
|
flatpak install -y flathub com.vscodium.codium
|
|
|
|
pause_if_debug
|
|
|
|
color_cyan "Install internet packages"
|
|
sudo dnf config-manager setopt google-chrome.enabled=1
|
|
install_packages google-chrome-stable
|
|
# temp removed packages
|
|
# discord firefox insync brave-bin
|
|
|
|
pause_if_debug
|
|
|
|
color_cyan "Install theming packages"
|
|
# variety
|
|
|
|
pause_if_debug
|
|
|
|
color_cyan "Install media packages"
|
|
install_packages mpv flameshot
|
|
# temp removed packages
|
|
# vlc gimp inkscape spotify lollypop
|
|
|
|
pause_if_debug
|
|
|
|
color_cyan "Install shell packages"
|
|
install_packages zsh zsh-syntax-highlighting
|
|
# temp removed packages
|
|
# fish oh-my-zsh-git zsh-completions
|
|
|
|
pause_if_debug
|
|
|
|
color_cyan "Install system-tools"
|
|
install_packages @development-tools wget cmake ninja-build pkgconf-pkg-config
|
|
|
|
pause_if_debug
|
|
|
|
color_cyan "Install tools"
|
|
install_packages system-config-printer system-config-printer-applet system-config-printer-libs ripgrep meld btop htop
|
|
# temp removed packages
|
|
# wttr
|
|
|
|
pause_if_debug
|
|
|
|
# End of script
|
|
color_green "Full setup completed."
|
|
|
|
###### TODO
|
|
### autostart flameshot tray icon
|
|
### autostart insync tray icon
|
|
### autostart volumeicon
|
|
### autostart clipboard manager
|
|
### set google chrome as default browser |