UX Refactor: Pauses, Status & WiFi

- Implemented global `_pause()` logic across all modules (`utils`, `gaming`, `firmware`, etc.), replacing hardcoded `read -p` calls to standardize exit pauses.
- Unified MangoHud installation into a single command (`apt install -y mangohud:i386`) for gaming and legacy branches.
- Refactored `_inst()` to return `*` instead of `(installed)`, moving the function globally to `utils.sh` and removing duplicates from helpers.
- Enhanced Broadcom WiFi detection with expanded grep patterns ('network controller', 'wireless', etc.) and ID fallback (`14e4`).
- Updated `_run_cmd` to integrate the new pause logic for consistent workflow interruptions during script execution.
This commit is contained in:
stornic56
2026-06-27 00:21:09 -05:00
committed by GitHub
parent ad0b39e159
commit 8d1a05e3e0
12 changed files with 50 additions and 22 deletions
+1 -8
View File
@@ -1,14 +1,6 @@
#!/usr/bin/env bash
# Shared helpers for extras categories
_inst() {
if is_installed "$1"; then echo " (installed)"; else echo ""; fi
}
_state() {
is_installed "$1" && echo "ON" || echo "OFF"
}
_install_clamav() {
if is_installed "clamav"; then
echo "ClamAV already installed."
@@ -21,6 +13,7 @@ _install_clamav() {
sudo systemctl stop clamav-freshclam 2>/dev/null || true
sudo freshclam || true
sudo systemctl start clamav-freshclam 2>/dev/null || true
_pause
fi
if _confirm "ClamAV" "Run quick scan on /bin to verify engine works?"; then
+5 -2
View File
@@ -180,12 +180,15 @@ _cat_general() {
_run_cmd "fwupd" "sudo fwupdmgr update -y" "Installing firmware updates..."
else
echo "Skipping firmware update."
_pause
fi
else
echo "No firmware updates available."
_pause
fi
fi
echo -e "${GREEN}fwupd setup complete.${NC}"
_pause
;;
kvm)
if ! is_installed "virt-manager"; then
@@ -250,8 +253,7 @@ _cat_general() {
echo -e " ${GREEN}Percentage Used:${NC} ${pu:-N/A}"
echo ""
done
echo "Press [ENTER] to continue..."
read -r
_pause
fi
;;
*)
@@ -269,5 +271,6 @@ _cat_general() {
done
echo -e "${GREEN}System tools installed.${NC}"
_pause
}