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
+5 -3
View File
@@ -175,6 +175,7 @@ Installs matching 32-bit graphics drivers."; then
if [ -z "$choices" ]; then
echo "No gaming tools selected."
_pause
return
fi
@@ -184,16 +185,16 @@ Installs matching 32-bit graphics drivers."; then
for pkg in $cleaned; do
case $pkg in
mangohud)
_run_cmd "MangoHud" "sudo apt install -y mangohud" "Installing MangoHud..."
local mh_pkgs="mangohud"
if $enable_32bit; then
local mh32_ver
mh32_ver=$(apt-cache policy mangohud:i386 2>/dev/null | \
awk 'NR==3 {print $2; exit}')
if [ -n "$mh32_ver" ] && [ "$mh32_ver" != "(none)" ]; then
_run_cmd "MangoHud" "sudo apt install -y mangohud:i386" \
"Installing MangoHud 32-bit..."
mh_pkgs+=" mangohud:i386"
fi
fi
_run_cmd "MangoHud" "sudo apt install -y $mh_pkgs" "Installing MangoHud (64 + 32-bit)..."
;;
gamemode) _run_cmd "GameMode" "sudo apt install -y gamemode" "Installing GameMode..." ;;
goverlay) _run_cmd "GOverlay" "sudo apt install -y goverlay" "Installing GOverlay..." ;;
@@ -204,4 +205,5 @@ Installs matching 32-bit graphics drivers."; then
done
echo -e "${GREEN}Lightweight gaming setup complete.${NC}"
_pause
}