Name: sl-toolbox Version: 1.1.1 Release: 100.3%{?dist} Summary: Sl's centralized Fedora package toolbox License: MIT URL: https://slsrepo.com BuildArch: noarch Requires: /usr/bin/bash Requires: /usr/bin/dnf Requires: sudo Requires: gum %description Sl's centralized Fedora package toolbox for installing and managing Slash packages from the COPR repository. This Fedora build intentionally excludes Arch, Artix, ISO, pacman, ALARM, and kernel installer actions. %prep # Nothing to prepare. %build cat > sl-toolbox <<'EOF' #!/usr/bin/env bash set -u # Initialize the alternate screen and catch force-quits. tput smcup 2>/dev/null || true clear trap 'tput rmcup 2>/dev/null || true; exit 0' SIGINT SIGTERM EXIT pause_for_logs() { echo "" read -r -p "➜ Press Enter to return to menu..." echo "" } print_banner() { clear echo -e "\e[38;5;25m" cat << "BANNER" _____ _ _ _____ _ _ / ___|| ( )___ |_ _|__ ___ | | |__ _____ __ \___ \| |// __| | |/ _ \ / _ \| | '_ \ / _ \ \/ / ___) | | \__ \ | | (_) | (_) | | |_) | (_) > < |____/|_| |___/ |_|\___/ \___/|_|_.__/ \___/_/\_\ BANNER echo -e "\e[0m" echo "" } sl_menu() { gum choose \ --cursor="➜ " \ --cursor.foreground="#42a5f5" \ --selected.foreground="#42a5f5" \ --header.foreground="#1b7ece" \ --selected.bold \ "$@" } need_sudo() { if [ "$EUID" -eq 0 ]; then return 0 fi sudo -v } install_pkg() { local pkg="$1" print_banner echo "Installing $pkg..." echo "" need_sudo || { echo "Could not get sudo privileges." pause_for_logs return } sudo dnf install -y "$pkg" pause_for_logs } remove_pkg() { local pkg="$1" print_banner echo "Removing $pkg..." echo "" need_sudo || { echo "Could not get sudo privileges." pause_for_logs return } sudo dnf remove -y "$pkg" pause_for_logs } upgrade_system() { print_banner echo "Upgrading Fedora packages..." echo "" need_sudo || { echo "Could not get sudo privileges." pause_for_logs return } sudo dnf upgrade -y pause_for_logs } show_copr_help() { print_banner cat << "HELP" Slash COPR repository: sudo dnf copr enable slsrepo/slash If dnf says the copr command is missing, install the COPR plugin first: sudo dnf install dnf-plugins-core Then run: sudo dnf copr enable slsrepo/slash HELP pause_for_logs } desktop_pkgs_menu() { while true; do print_banner choice="$(sl_menu --header="--- Sl's Desktop Packages ---" \ "Full Desktop (sl-desktop-full)" \ "sl-greeter & sl-lock (sl-desktop-utils)" \ "Desktop Assets (sl-desktop-assets)" \ "Blue DMS Theme (sl-blue-dms-theme)" \ "Back")" case "$choice" in "Full Desktop (sl-desktop-full)") install_pkg "sl-desktop-full" ;; "sl-greeter & sl-lock (sl-desktop-utils)") install_pkg "sl-desktop-utils" ;; "Desktop Assets (sl-desktop-assets)") install_pkg "sl-desktop-assets" ;; "Blue DMS Theme (sl-blue-dms-theme)") install_pkg "sl-blue-dms-theme" ;; "Back"|"") return ;; esac done } daily_background_menu() { while true; do print_banner choice="$(sl_menu --header="--- Sl's Daily Background ---" \ "From Bing (sl-daily-background-bing)" \ "From NASA (sl-daily-background-nasa)" \ "From Unsplash (sl-daily-background-unsplash)" \ "Back")" case "$choice" in "From Bing (sl-daily-background-bing)") install_pkg "sl-daily-background-bing" ;; "From NASA (sl-daily-background-nasa)") install_pkg "sl-daily-background-nasa" ;; "From Unsplash (sl-daily-background-unsplash)") install_pkg "sl-daily-background-unsplash" ;; "Back"|"") return ;; esac done } tools_menu() { while true; do print_banner choice="$(sl_menu --header="--- Sl's Tools ---" \ "Sl's Display Mirror (sl-display-mirror)" \ "Sl's Disklabel Utils (sl-disklabel-utils-git)" \ "Sl's XKB Mac Layouts (sl-xkb-mac-layouts)" \ "Meerkrite TUI Editor (meerkrite-tui)" \ "Little Snitch for Linux (littlesnitch)" \ "Wayidle (wayidle)" \ "Back")" case "$choice" in "Sl's Display Mirror (sl-display-mirror)") install_pkg "sl-display-mirror" ;; "Sl's Disklabel Utils (sl-disklabel-utils-git)") install_pkg "sl-disklabel-utils-git" ;; "Sl's XKB Mac Layouts (sl-xkb-mac-layouts)") install_pkg "sl-xkb-mac-layouts" ;; "Meerkrite TUI Editor (meerkrite-tui)") install_pkg "meerkrite-tui" ;; "Little Snitch for Linux (littlesnitch)") install_pkg "littlesnitch" ;; "Wayidle (wayidle)") install_pkg "wayidle" ;; "Back"|"") return ;; esac done } remove_menu() { while true; do print_banner choice="$(sl_menu --header="--- Remove Slash Packages ---" \ "sl-desktop-full" \ "sl-desktop-utils" \ "sl-desktop-assets" \ "sl-blue-dms-theme" \ "sl-daily-background-bing" \ "sl-daily-background-nasa" \ "sl-daily-background-unsplash" \ "sl-display-mirror" \ "sl-disklabel-utils-git" \ "sl-xkb-mac-layouts" \ "meerkrite-tui" \ "littlesnitch" \ "wayidle" \ "Back")" case "$choice" in "Back"|"") return ;; *) remove_pkg "$choice" ;; esac done } while true; do print_banner choice="$(sl_menu --header="--- Welcome to Sl's Fedora Toolbox ---" \ "Install Sl's Desktop Packages" \ "Install Sl's Daily Background Packages" \ "Install Sl's Tools" \ "Remove Slash Packages" \ "Upgrade Fedora Packages" \ "Show COPR Setup Help" \ "Quit")" case "$choice" in "Install Sl's Desktop Packages") desktop_pkgs_menu ;; "Install Sl's Daily Background Packages") daily_background_menu ;; "Install Sl's Tools") tools_menu ;; "Remove Slash Packages") remove_menu ;; "Upgrade Fedora Packages") upgrade_system ;; "Show COPR Setup Help") show_copr_help ;; "Quit"|"") tput rmcup 2>/dev/null || true exit 0 ;; esac done EOF %install install -Dm755 sl-toolbox %{buildroot}%{_bindir}/sl-toolbox %files %{_bindir}/sl-toolbox %changelog * Sat Jun 20 2026 Sl (Shahaf Levi) - 1.1.1-3 - Filter Fedora build to Fedora-safe package management actions only