mirror of
https://github.com/stornic56/debianito-post-install.git
synced 2026-07-16 05:49:49 +00:00
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:
@@ -71,8 +71,8 @@ The submenu offers the next categories:
|
||||
| **4** | Media Players | Multimedia playback with VLC media player and MPV for advanced video/audio support |
|
||||
| **5** | Multimedia & Design | image editing (GIMP), video editing (Kdenlive, HandBrake), 3D modeling (Blender), audio recording (Audacity), and graphics design (Inkscape) |
|
||||
| **6** | Code Editors & IDEs | vim, vim-gtk3, Neovim, Helix, nano, Emacs, Kate, Mousepad, Gedit, Geany, GNOME Text Editor, and VSCodium (VS Code open-source) |
|
||||
| **7** | Servers & Dev Tools | Web servers (Nginx/Apache), databases (PostgreSQL/MariaDB), Java Development Kit (Temurin 17/21/25 JDK), Docker, Python, SSH tools, fail2ban, Jellyfin Server and essential utilities |
|
||||
| **8** | Security & Networking | Wireshark, tcpdump, Zenmap, ClamAV, UFW, Fail2ban |
|
||||
| **7** | Servers & Dev Tools | Web servers (Nginx/Apache), databases (PostgreSQL/MariaDB), Java Development Kit (Temurin 17/21/25 JDK), Docker, Python, SSH tools, Jellyfin Server and essential utilities |
|
||||
| **8** | Security & Networking | Wireshark, tcpdump, Zenmap, ClamAV, UFW, fail2ban |
|
||||
| **9** | Software Centers | Choose a software store to install. |
|
||||
| **10** | System Tools | htop/btop, ncdu, Timeshift, tmux/screen, nvme-cli, Flatpak support, extension repository manager and qemu/virtmanager |
|
||||
| **11** | Fetch / System Info | fastfetch/neofetch, hyfetch, Linux logo and screenfetch |
|
||||
|
||||
@@ -490,6 +490,7 @@ _cat_general_bullseye() {
|
||||
if _confirm "Firmware Scan" "Scan for firmware updates now?"; then
|
||||
sudo fwupdmgr refresh --force 2>/dev/null || true
|
||||
sudo fwupdmgr get-updates 2>&1 || true
|
||||
_pause
|
||||
fi
|
||||
;;
|
||||
nvme-cli)
|
||||
@@ -505,6 +506,7 @@ _cat_general_bullseye() {
|
||||
esac
|
||||
done
|
||||
echo -e "${GREEN}System tools installed.${NC}"
|
||||
_pause
|
||||
}
|
||||
|
||||
_cat_fetch_bullseye() {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -268,6 +268,7 @@ _handle_wireless() {
|
||||
_run_cmd "Broadcom" "sudo DEBIAN_FRONTEND=noninteractive apt install -y linux-headers-$(uname -r) broadcom-sta-dkms" \
|
||||
"Installing Broadcom driver..."
|
||||
echo "Broadcom proprietary driver installed. A reboot may be required."
|
||||
_pause
|
||||
installed_any=true
|
||||
fi
|
||||
fi
|
||||
@@ -281,6 +282,7 @@ _handle_wireless() {
|
||||
|
||||
if ! $installed_any; then
|
||||
echo "No special WiFi firmware needed -- base firmware-linux-nonfree covers this system."
|
||||
_pause
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -307,6 +309,7 @@ main menu to install proprietary firmwares." 10 65
|
||||
# 3. Confirm
|
||||
if ! _confirm "Firmware" "Apply the network & firmware plan?"; then
|
||||
echo "Firmware installation skipped."
|
||||
_pause
|
||||
return
|
||||
fi
|
||||
|
||||
@@ -328,6 +331,7 @@ main menu to install proprietary firmwares." 10 65
|
||||
fi
|
||||
else
|
||||
echo "$fw_pkg already installed."
|
||||
_pause
|
||||
fi
|
||||
else
|
||||
local msg="firmware-linux-nonfree provides hardware drivers for:\n"
|
||||
@@ -366,4 +370,5 @@ main menu to install proprietary firmwares." 10 65
|
||||
|
||||
# 8. Summary
|
||||
echo -e "${GREEN}Network & firmware setup complete.${NC}"
|
||||
_pause
|
||||
}
|
||||
|
||||
@@ -151,6 +151,7 @@ install_gaming() {
|
||||
|
||||
if [ -z "$choices" ]; then
|
||||
echo "No gaming packages selected."
|
||||
_pause
|
||||
return
|
||||
fi
|
||||
|
||||
@@ -192,4 +193,5 @@ install_gaming() {
|
||||
done
|
||||
|
||||
echo -e "${GREEN}Gaming setup complete.${NC}"
|
||||
_pause
|
||||
}
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
# Gaming performance tools installation
|
||||
|
||||
install_mangohud() {
|
||||
_run_cmd "MangoHud" "sudo apt install -y mangohud" "Installing MangoHud..."
|
||||
local pkgs="mangohud"
|
||||
if dpkg --print-foreign-architectures | grep -q i386; then
|
||||
echo "Installing 32-bit MangoHud..."
|
||||
_run_cmd "MangoHud" "sudo apt install -y mangohud:i386" "Installing 32-bit MangoHud..."
|
||||
pkgs+=" mangohud:i386"
|
||||
fi
|
||||
_run_cmd "MangoHud" "sudo apt install -y $pkgs" "Installing MangoHud (64 + 32-bit)..."
|
||||
}
|
||||
|
||||
install_gamemode() {
|
||||
@@ -60,6 +60,7 @@ install_openrgb() {
|
||||
|
||||
rm -f "${deb_path}"
|
||||
echo -e "${GREEN}OpenRGB installed. NOTE: You must reboot or log out/in for the 'i2c' group to take effect.${NC}"
|
||||
_pause
|
||||
}
|
||||
|
||||
install_retroarch() {
|
||||
@@ -86,5 +87,5 @@ install_retroarch() {
|
||||
echo " Please check our repository's documentation or visit:"
|
||||
echo " https://wiki.debian.org/RetroArch"
|
||||
echo "================================================================="
|
||||
read -p "Press ENTER to continue..."
|
||||
_pause
|
||||
}
|
||||
|
||||
@@ -27,4 +27,5 @@ install_kernel_backports() {
|
||||
|
||||
_run_cmd "Kernel" "sudo apt install -y -t ${DEBIAN_CODENAME}-backports linux-image-amd64" "Installing kernel from backports..."
|
||||
echo -e "${GREEN}Kernel installed. Reboot to use it.${NC}"
|
||||
_pause
|
||||
}
|
||||
|
||||
@@ -402,6 +402,7 @@ Mesa versions without compromising overall system stability." 16 70; then
|
||||
sudo apt autoremove -y
|
||||
sudo apt autoclean
|
||||
echo -e "${GREEN}System upgraded.${NC}"
|
||||
_pause
|
||||
else
|
||||
echo "Skipping upgrade."
|
||||
fi
|
||||
@@ -409,6 +410,7 @@ Mesa versions without compromising overall system stability." 16 70; then
|
||||
else
|
||||
restore_previous_repos
|
||||
echo -e "${RED}apt update failed. Previous repository configuration restored.${NC}"
|
||||
_pause
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
+19
-3
@@ -150,6 +150,14 @@ is_installed() {
|
||||
dpkg -l "$1" 2>/dev/null | grep -q '^ii'
|
||||
}
|
||||
|
||||
_inst() {
|
||||
if is_installed "$1"; then echo " *"; else echo ""; fi
|
||||
}
|
||||
|
||||
_state() {
|
||||
is_installed "$1" && echo "ON" || echo "OFF"
|
||||
}
|
||||
|
||||
# ----------------------------------
|
||||
# Package version lookup
|
||||
# ----------------------------------
|
||||
@@ -275,7 +283,10 @@ detect_network() {
|
||||
fi
|
||||
|
||||
local wifi_line
|
||||
wifi_line=$(lspci -nn | grep -i 'Network controller' | head -n1) || true
|
||||
wifi_line=$(lspci -nn | grep -iE 'network controller|wireless|wi-fi|wlan|802\.11' | head -n1) || true
|
||||
if [ -z "$wifi_line" ]; then
|
||||
wifi_line=$(lspci -nn | grep -i '14e4:' | head -n1) || true
|
||||
fi
|
||||
if [ -n "$wifi_line" ]; then
|
||||
WIFI_CHIPSET="$wifi_line"
|
||||
WIFI_DESC=$(echo "$wifi_line" | sed -E 's/^.*\]: //; s/ \[[0-9a-fA-F]{4}:[0-9a-fA-F]{4}\]//; s/ \(rev [0-9a-fA-F]+\)//')
|
||||
@@ -508,6 +519,12 @@ _msg() {
|
||||
whiptail --title "$1" --msgbox "$2" "${3:-10}" "${4:-65}"
|
||||
}
|
||||
|
||||
_pause() {
|
||||
echo ""
|
||||
echo "Press [ENTER] to continue..."
|
||||
read -r
|
||||
}
|
||||
|
||||
# Blocks 2-4: clear → run → pause
|
||||
_run_cmd() {
|
||||
local title="$1" command="$2" success_msg="${3:-Running...}"
|
||||
@@ -522,8 +539,7 @@ _run_cmd() {
|
||||
else
|
||||
echo -e "${RED}[-]${NC} Failed (exit code: $rc)."
|
||||
fi
|
||||
echo "Press [ENTER] to continue..."
|
||||
read -r
|
||||
_pause
|
||||
}
|
||||
|
||||
# Blocks 1-4: confirm → clear → run → pause
|
||||
|
||||
@@ -65,4 +65,5 @@ EOF
|
||||
sudo zramctl
|
||||
echo ""
|
||||
echo -e "${GREEN}You can verify with: sudo zramctl${NC}"
|
||||
_pause
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user