mirror of
https://github.com/stornic56/debianito-post-install.git
synced 2026-10-31 13:08:06 +00:00
89233b0750
- `.github/workflows/ci.yml` added as a new workflow: job `lint-and-test` on `runs-on: ubuntu-latest` with `container: debian:trixie`, checking out via `actions/checkout@v4`, installing `bats` and `shellcheck`, running `shellcheck --severity=error debianito.sh modules/**/*.sh` (with `shopt -s globstar`) and `bats tests/`.
- `debianito.sh` CLI parser: `AUTO_YES=0`, `ALLOW_DESTRUCTIVE=0` declared after `MODULES_DIR` and before `_boot_mark`; `_usage()` prints `Usage: debianito.sh [OPTIONS]` with `--yes`, `--allow-destructive` and `--help`; the `while [ $# -gt 0 ]` / `case` loop consumes `--yes` and `--allow-destructive`, prints `Unknown option: $1 (run with --help for usage)` to stderr and `exit 2` for unknown flags, and `--help|-h` runs `_usage` then `exit 0`.
- `modules/utils.sh`: new global `_SELECTION_CONFIRMED=0` and `_confirm_install_list()` (utils.sh:756-785), which renders items capped at 15 with `... and N more`, computes `height` capped at 24, calls `_confirm "$title" "$list" "$height" 65`, arms `_SELECTION_CONFIRMED=${#items[@]}` on yes, and returns 1 for an empty list or on decline. `_install_pkg()` (utils.sh:789-804) decrements the countdown instead of prompting, and only prompts via `elif ! _confirm "Install: ${pkg}" "Install ${pkg}\nVersion: ${ver}?"; then return 0`.
- Bulk retrofit in `modules/extras/**/*.sh` (18 sites): `_confirm_install_list "Título" "${array[@]}" || return` placed right after the `whiptail` selection is parsed, the install loop left intact, and `_SELECTION_CONFIRMED=0` after the loop. Files: office/office.sh:101, system/software_centers.sh:29, system/system.sh:133, communication/communication.sh:68, design/design.sh:42, download/download.sh:48+55, terminals/terminals.sh:31, security/security.sh:30, players/players.sh:20, themes/fonts/fonts.sh:32, dev/dev.sh:44, programming/programming.sh:57, themes/desktop-themes/desktop-themes.sh:30, fetch/fetch.sh:41, themes/icons/icons.sh:47, themes/cursors/cursors.sh:28, internet/internet.sh:197, java.
- `modules/bullseye/extras.sh` (13 sites) plus `modules/bullseye/legacy.sh` (1 site, `install_gaming_bullseye`, guarded with `if [ ${#_install_pkgs[@]} -gt 0 ]` so a i386-only selection does not blank the summary) plus `modules/desktop_display.sh` (1 site, XFCE Custom — a no-loop `_run_cmd` batch with the reset immediately after it). Special cases: download.sh and bullseye/download each have two checklists merged into one combined summary; legacy.sh gaming skips the reset when the list is empty; XFCE Custom resets before `_xfce_polkit_rules` so the counter cannot leak.
- `modules/desktops/desktop_gnome.sh` (new): `gnome_menu()` runs a `_radiolist` with "1" "GNOME (Full Desktop)", "2" "GNOME Core (Minimal Install)", "3" "Back", then `_install_gnome_full()` and `_install_gnome_core()`. Each arms `_confirm_install_list "GNOME Full Desktop" gnome gdm3 || return` (core: `gnome-core gdm3`), keeps an already-configured display manager via `_existing_display_manager` by setting `target_dm="$keep_dm"`, writes the preseed `echo "${target_dm} shared/default-x-display-manager select ${target_dm}" | sudo debconf-set-selections`, installs `sudo apt install -y gnome gdm3` / `gnome-core gdm3`, enables `gdm3` only when `target_dm = "gdm3"`, resets `_SELECTION_CONFIRMED=0` and calls `_offer_pipewire_after_desktop`.
- `modules/desktops/desktop_kde.sh` (new): `kde_menu()` runs a `_radiolist` with "1" "KDE Plasma (Full Desktop)", "2" "KDE Plasma Desktop (Minimal)", "3" "Back"; `_install_kde_full()` and `_install_kde_minimal()` arm `_confirm_install_list "KDE Plasma Full" kde-standard sddm || return` (minimal: `kde-plasma-desktop sddm`), preseed `sddm shared/default-x-display-manager select sddm`, install `sudo apt install -y kde-standard sddm` / `kde-plasma-desktop sddm`, enable `sddm` only when it is the target DM, reset the counter and offer PipeWire.
- `modules/desktop_display.sh` `desktop_environment_menu()`: `env_items+=("3" "GNOME")`, `env_items+=("4" "KDE Plasma")`, `env_items+=("5" "Back")`; the case adds `3)` loading `gnome` via `_load_module gnome || continue` and calling `gnome_menu`, and `4)` loading `kde` via `_load_module kde || continue` and calling `kde_menu`; the dead TODO comment was removed.
- PipeWire retrofit in `modules/desktop_display.sh` (6 sites): `_install_lxde_full`, `_install_lxde_core`, `_install_xfce_full`, `_install_xfce_minimal`, `_install_xfce_wayland` and `_install_xfce_custom` each call `_offer_pipewire_after_desktop` after their install block.
- `_offer_pipewire_after_desktop()` and `_existing_display_manager()` added at the end of `modules/desktop_display.sh`: `_offer_pipewire_after_desktop` checks `pipewire-audio` (`pipewire` when `DEBIAN_VERSION = 11`), returns 0 via `is_installed`, otherwise `_confirm "PipeWire Audio" "No PipeWire audio server is installed.\n\nInstall the PipeWire audio stack (recommended)?"` calls `_install_pipewire_standard` and returns 0. `_existing_display_manager` reads `${DM_FILE:-/etc/X11/default-display-manager}`, reads the basename as the DM, and otherwise scans `gdm3 lightdm sddm greetd gdm` with `systemctl is-enabled`, printing nothing when none is found.
- `_ensure_apt_updated` added before the GNOME/KDE `apt install` transactions (4 sites, deduplicated per session); `gnome gdm3` and `kde-standard sddm` are installed alongside even when another display manager is kept as the default.
- Extraction to `modules/desktops/`: `desktop_lxde.sh` (38 lines) and `desktop_xfce.sh` (119 lines) created with the `lxde_menu` / `_install_lxde_full` / `_install_lxde_core` and `xfce_menu` / `_install_xfce_full` / `_install_xfce_minimal` / `_install_xfce_wayland` / `_install_xfce_custom` / `_xfce_polkit_rules` blocks moved verbatim; both carry `# License GPL v3` in their headers.
- `modules/desktop_display.sh` reduced from 542 to 394 lines (−154): lines 55-208 removed, the dispatch (desktop_display.sh:39-46) replaced with `_load_module xfce || continue` / `lxde_menu`, and the file left with `manage_desktop_display`, `desktop_environment_menu`, `display_manager_menu`, `lightdm_config_menu`, `configure_greetd`, `configure_gdm3`, `configure_sddm`, the two shared helpers.
- `modules/utils.sh` `_load_module` map: `xfce)` → `${MODULES_DIR}/desktops/desktop_xfce.sh`, `lxde)` → `${MODULES_DIR}/desktops/desktop_lxde.sh`, `gnome)` → `${MODULES_DIR}/desktops/desktop_gnome.sh`, `kde)` → `${MODULES_DIR}/desktops/desktop_kde.sh`; deps for `xfce`, `lxde`, `gnome` and `kde` are `(desktop_display audio)` and `desktop_display` is `(repos audio)`.
- `modules/desktops/desktop_xfce.sh` `_xfce_polkit_rules()` writes `/etc/polkit-1/rules.d/85-suspend.rules` and `89-backlight.rules` via `sudo tee`, adds the `backlight` group with `groupadd --system` fallback, adds the real login user from `/etc/passwd` to `backlight` and restarts `polkit.service`.
- ES→EN user-facing strings: 14 strings across 4 files — `desktop_display.sh` `lxdе_menu` ("LXDE (Full Desktop)", "LXDE Core (Minimal Install)"), `gpu/nvidia.sh` Kepler legacy-driver notice ("Kepler GPU detected (GKxxx)… Install the legacy driver for Kepler?"), `bullseye/legacy.sh` ("Install NVIDIA driver?", "Skipping NVIDIA driver.", "Installing NVIDIA driver ${gpu_gen}...") and `bullseye/extras.sh` ("firmware-linux-nonfree provides drivers for… Install?").
- ES→EN internal comments: ~35 comments across 9 files — section headers in `_install_nvidia_standard`, `gpu/_helpers.sh` (lines 5, 113), `gpu/nvidia.sh` (lines 8-12, 19-22, 68-70, 167-172, 196, 239-253, 262-263, 275, 291, 336-338, 376), `gpu.sh` (lines 15-17), `bullseye/repos.sh` (line 2), `firmware.sh` (line 235, "--- Load verification ---"), `utils.sh` (lines 129, 132, 153 — timezone Paso 1/2/4) and `utils.sh:546,548`.
- set -e abort fix: `debianito.sh:149` now reads `_system_preferences_menu || true`, consistent with the other dispatch chains (14 of the 15 chains already had the guard); a declined pre-apply summary now leaves the TUI alive instead of terminating the script.
- `docs/desktops_display.md`: 4 hunks — intro now lists GNOME/GNOME Core/KDE Plasma/KDE Plasma Desktop/XFCE/XFCE Wayland/XFCE Custom/LXDE, a new "Modular layout" paragraph describing `modules/desktops/` and lazy loading, Block 1 rewritten into four environments, five new bullets (pre-apply summary, existing-DM preservation, PipeWire offer, stale-lists guard) and a Desktop Environment Packages table.
- `docs/quickstart.md` line 284: Desktop Environment entry expanded to pick from XFCE (full / minimal / Wayland `labwc` on Trixie / custom checklist), LXDE (full / core), GNOME (full / core) or KDE Plasma (full / minimal).
- `_existing_display_manager` now takes the config path via `local dm_file="${DM_FILE:-/etc/X11/default-display-manager}"` so the offline test suite never reads the real system file.
- `tests/test_helper.bash`: added `_mock_systemctl()` for `is-enabled` (units in `MOCK_SYSTEMCTL_ENABLED` report `enabled`, everything else `disabled`), `MOCK_SYSTEMCTL_ENABLED=""`, `WHIPTAIL_CALLS`/`MOCK_WHIPTAIL_OUTPUT`/`MOCK_WHIPTAIL_RC`, `MOCK_DPKG_INSTALLED` and the `systemctl` entry in the mock list and in `mock_reset()`.
- `tests/desktops.bats` created with 16 tests: `_existing_display_manager` (file read, file-preferred over an enabled unit, enabled-unit fallback, candidate order, missing file, nothing configured), `_offer_pipewire_after_desktop` (5 tests: skip-installed, accept-installs, decline-returns-0, Bullseye package name, wrong package name on 11), `_load_module` (4 tests for xfce/lxde/gnome/kde) and an unknown-module case; 17→33 tests total.
- `.github/workflows/ci.yml` shellcheck severity raised from `--severity=error` to `--severity=warning`.
- `debianito.sh`: `RED`, `GREEN`, `YELLOW`, `CYAN` and `NC` plus `AUTO_YES`, `ALLOW_DESTRUCTIVE` and `DEBIAN_CODENAME` are now `export`ed as cross-file globals.
- `modules/utils.sh`: `HAS_NVIDIA`, `DESKTOP_ENV`, `AUDIO_SERVER`, `DEBIAN_VERSION` and the other cross-file globals are `export`ed.
- `modules/extras/system/software_centers.sh` gained a `#!/usr/bin/env bash` shebang.
- `shellcheck` triage (v0.11.0, baseline `--severity=warning` 25 findings → 0): removed two dead-code lines (`headless` in `extras/dev/dev.sh`, orphan `dev_id` in `firmware.sh`); `SC2206` in `extras/dev/essential.sh` fixed by expanding `$comp_pkgs` to `"${comp_pkgs[@]}"`; `SC2010`/`SC2046` (3 sites) replaced `ls … | grep` with `compgen -G "…"`; `SC2155` (2 sites, `gpu.sh` and `rescue.sh`) split command substitutions into separate lines; `SC2166` in `repos.sh` replaced `-o` with `{ … || … }`; `SC2221`/`SC2222` (2 sites, `sysinfo.sh` and `utils.sh`) collapsed the `wl*|wlp*|wlo*|wlan*` alternation to `wl*`; `SC1090` in `extras.sh` gained a justification comment on the disable directive.
- Final verification: `bash -n` on all 15 modified `.sh` files and `set -euo pipefail` at `debianito.sh:3` both intact; `bats tests/` reports 33 ok / 0 failed; invariants `offers 11`, `confirm_install_list 39` and `_SELECTION_CONFIRMED=0 40` hold.
813 lines
33 KiB
Bash
813 lines
33 KiB
Bash
#!/usr/bin/env bash
|
|
# extras.sh — Bullseye: software purgado / solo repos oficiales
|
|
# License GPL v3
|
|
|
|
# ── Essential Pack (Bullseye) ──
|
|
_quick_install_bullseye() {
|
|
_msg "Essential Pack" \
|
|
"Install basic programs:\n\n\
|
|
- Compression (zip, unrar, 7z)\n\
|
|
- System tools (htop, inxi, neofetch)\n\
|
|
- Networking (curl, wget, ufw)\n\
|
|
- CA certs & GPG\n\
|
|
- VLC media player" 13 60
|
|
|
|
local quick_pkgs=(
|
|
zip unzip rar unrar p7zip-full p7zip-rar
|
|
neofetch htop inxi curl wget ufw
|
|
ca-certificates gnupg lsb-release
|
|
)
|
|
_is_headless || quick_pkgs+=(vlc)
|
|
_run_install_batch "${quick_pkgs[@]}"
|
|
echo -e "${GREEN}Essential Pack installed.${NC}"
|
|
}
|
|
|
|
# ── Firmware (Bullseye) ──
|
|
install_firmware_bullseye() {
|
|
echo -e "${YELLOW}Installing firmware-linux-nonfree (Bullseye)...${NC}"
|
|
|
|
# ── Safeguard: non-free repos must be enabled ──
|
|
if ! grep -qr "non-free" /etc/apt/sources.list /etc/apt/sources.list.d/ 2>/dev/null; then
|
|
_msg "Error" "Error: No 'non-free' repositories were detected.\n\
|
|
Please first run the 'Configure repositories' option in the\n\
|
|
main menu to install proprietary firmwares." 10 65
|
|
return 1
|
|
fi
|
|
|
|
if is_installed "firmware-linux-nonfree"; then
|
|
echo "firmware-linux-nonfree already installed."
|
|
return
|
|
fi
|
|
|
|
local fw_ver
|
|
fw_ver=$(apt-cache policy firmware-linux-nonfree 2>/dev/null | awk 'NR==3 {print $2; exit}')
|
|
|
|
if _confirm "Firmware" \
|
|
"firmware-linux-nonfree provides drivers for:\n\
|
|
WiFi, Bluetooth, GPU, audio, webcams, etc.\n\n\
|
|
Version: ${fw_ver:-unknown}\n\n\
|
|
Install?"; then
|
|
_run_cmd "Firmware" "sudo apt install -y firmware-linux-nonfree" \
|
|
"Installing firmware-linux-nonfree..."
|
|
echo -e "${GREEN}Firmware installed.${NC}"
|
|
fi
|
|
type _handle_wireless &>/dev/null && _handle_wireless
|
|
}
|
|
|
|
# ======================================================================
|
|
# EXTRA SOFTWARE CATEGORIES — Bullseye versions (purged/whitelisted)
|
|
# Only packages available in Debian 11 official repos.
|
|
# ======================================================================
|
|
|
|
_cat_customization_bullseye() {
|
|
local sub
|
|
sub=$(
|
|
_menu "Customization (Bullseye)" "Select type:" $TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
|
|
"1" "Desktop Themes (GTK/KDE)" \
|
|
"2" "Icon Themes" \
|
|
"3" "Cursor Themes" \
|
|
"4" "Fonts" \
|
|
"5" "Terminals"
|
|
)
|
|
[ -z "$sub" ] && return
|
|
case $sub in
|
|
1) _cat_themes_bullseye ;;
|
|
2) _cat_icons_bullseye ;;
|
|
3) _cat_cursors_bullseye ;;
|
|
4) _cat_fonts_bullseye ;;
|
|
5) _cat_terminals ;;
|
|
esac
|
|
}
|
|
|
|
_cat_themes_bullseye() {
|
|
local item_count=6
|
|
local lista_alto=$((item_count > TUI_ALTO_LISTA ? TUI_ALTO_LISTA : item_count))
|
|
local choices
|
|
choices=$(
|
|
_checklist "Desktop Themes (Bullseye)" "Check [*] the packages you want installed/updated on your system.\n" $TUI_ALTO $TUI_ANCHO $lista_alto \
|
|
"arc-theme" "Arc GTK theme" "$(_state arc-theme)" \
|
|
"blackbird-gtk-theme" "Blackbird GTK theme" "$(_state blackbird-gtk-theme)" \
|
|
"bluebird-gtk-theme" "Bluebird GTK theme" "$(_state bluebird-gtk-theme)" \
|
|
"breeze-gtk-theme" "Breeze GTK theme (KDE port)" "$(_state breeze-gtk-theme)" \
|
|
"greybird-gtk-theme" "Greybird GTK theme" "$(_state greybird-gtk-theme)" \
|
|
"numix-gtk-theme" "Numix GTK theme" "$(_state numix-gtk-theme)"
|
|
)
|
|
clear
|
|
[ -z "$choices" ] && return
|
|
local cleaned
|
|
cleaned=$(echo "$choices" | tr -d '"')
|
|
# BH-004: Convert to array to avoid word splitting and injection.
|
|
local -a _pkgs=()
|
|
while IFS= read -r _pkg; do
|
|
[ -n "$_pkg" ] && _pkgs+=("$_pkg")
|
|
done < <(echo "$cleaned" | tr ' ' '\n')
|
|
# Pre-apply summary: confirm the selection once,
|
|
# before any apt transaction starts.
|
|
_confirm_install_list "Desktop Themes (Bullseye)" "${_pkgs[@]}" || return
|
|
for pkg in "${_pkgs[@]}"; do
|
|
! is_installed "$pkg" && _run_install "$pkg" || echo "$pkg already installed."
|
|
done
|
|
|
|
# Release the per-package prompt suppression.
|
|
_SELECTION_CONFIRMED=0
|
|
echo -e "${GREEN}Desktop themes installed.${NC}"
|
|
}
|
|
|
|
_cat_icons_bullseye() {
|
|
local items=(
|
|
"breeze-icon-theme" "Breeze icon theme" "$(_state breeze-icon-theme)"
|
|
"deepin-icon-theme" "Deepin icon theme" "$(_state deepin-icon-theme)"
|
|
"moka-icon-theme" "Moka icon theme" "$(_state moka-icon-theme)"
|
|
"numix-icon-theme" "Numix icon theme" "$(_state numix-icon-theme)"
|
|
"numix-icon-theme-circle" "Numix Circle icon theme" "$(_state numix-icon-theme-circle)"
|
|
"obsidian-icon-theme" "Obsidian icon theme" "$(_state obsidian-icon-theme)"
|
|
"papirus-icon-theme" "Papirus icon theme" "$(_state papirus-icon-theme)"
|
|
"paper-icon-theme" "Paper icon theme" "$(_state paper-icon-theme)"
|
|
"suru-icon-theme" "Suru icon theme" "$(_state suru-icon-theme)"
|
|
)
|
|
local item_count=${#items[@]}
|
|
local lista_alto=$((item_count > TUI_ALTO_LISTA ? TUI_ALTO_LISTA : item_count))
|
|
local choices
|
|
choices=$(_checklist "Icon Themes (Bullseye)" "Check [*] the packages you want installed/updated on your system.\n" $TUI_ALTO $TUI_ANCHO $lista_alto \
|
|
"${items[@]}")
|
|
clear
|
|
[ -z "$choices" ] && return
|
|
local cleaned
|
|
cleaned=$(echo "$choices" | tr -d '"')
|
|
# BH-004: Convert to array to avoid word splitting and injection.
|
|
local -a _pkgs=()
|
|
while IFS= read -r _pkg; do
|
|
[ -n "$_pkg" ] && _pkgs+=("$_pkg")
|
|
done < <(echo "$cleaned" | tr ' ' '\n')
|
|
# Pre-apply summary: confirm the selection once,
|
|
# before any apt transaction starts.
|
|
_confirm_install_list "Icon Themes (Bullseye)" "${_pkgs[@]}" || return
|
|
for pkg in "${_pkgs[@]}"; do
|
|
! is_installed "$pkg" && _run_install "$pkg" || echo "$pkg already installed."
|
|
done
|
|
|
|
# Release the per-package prompt suppression.
|
|
_SELECTION_CONFIRMED=0
|
|
echo -e "${GREEN}Icon themes installed.${NC}"
|
|
}
|
|
|
|
_cat_cursors_bullseye() {
|
|
local item_count=5
|
|
local lista_alto=$((item_count > TUI_ALTO_LISTA ? TUI_ALTO_LISTA : item_count))
|
|
local choices
|
|
choices=$(
|
|
_checklist "Cursor Themes (Bullseye)" "Check [*] the packages you want installed/updated on your system.\n" $TUI_ALTO $TUI_ANCHO $lista_alto \
|
|
"breeze-cursor-theme" "Breeze cursors (KDE)" "$(_state breeze-cursor-theme)" \
|
|
"chameleon-cursor-theme" "Chameleon cursors" "$(_state chameleon-cursor-theme)" \
|
|
"dmz-cursor-theme" "DMZ cursors" "$(_state dmz-cursor-theme)" \
|
|
"oxygencursors" "Oxygen cursors (KDE legacy)" "$(_state oxygencursors)" \
|
|
"xcursor-themes" "X11 base cursors" "$(_state xcursor-themes)"
|
|
)
|
|
clear
|
|
[ -z "$choices" ] && return
|
|
local cleaned
|
|
cleaned=$(echo "$choices" | tr -d '"')
|
|
# BH-004: Convert to array to avoid word splitting and injection.
|
|
local -a _pkgs=()
|
|
while IFS= read -r _pkg; do
|
|
[ -n "$_pkg" ] && _pkgs+=("$_pkg")
|
|
done < <(echo "$cleaned" | tr ' ' '\n')
|
|
# Pre-apply summary: confirm the selection once,
|
|
# before any apt transaction starts.
|
|
_confirm_install_list "Cursor Themes (Bullseye)" "${_pkgs[@]}" || return
|
|
for pkg in "${_pkgs[@]}"; do
|
|
! is_installed "$pkg" && _run_install "$pkg" || echo "$pkg already installed."
|
|
done
|
|
|
|
# Release the per-package prompt suppression.
|
|
_SELECTION_CONFIRMED=0
|
|
echo -e "${GREEN}Cursor themes installed.${NC}"
|
|
}
|
|
|
|
_cat_fonts_bullseye() {
|
|
local item_count=4
|
|
local lista_alto=$((item_count > TUI_ALTO_LISTA ? TUI_ALTO_LISTA : item_count))
|
|
local choices
|
|
choices=$(
|
|
_checklist "Fonts (Bullseye)" "Check [*] the packages you want installed/updated on your system.\n" $TUI_ALTO $TUI_ANCHO $lista_alto \
|
|
"fonts-firacode" "Fira Code monospace font" "$(_state fonts-firacode)" \
|
|
"fonts-noto" "Noto fonts (Google)" "$(_state fonts-noto)" \
|
|
"fonts-dejavu-core" "DejaVu core fonts" "$(_state fonts-dejavu-core)" \
|
|
"ttf-mscorefonts-installer" "Microsoft Core Fonts" "$(_state ttf-mscorefonts-installer)"
|
|
)
|
|
clear
|
|
[ -z "$choices" ] && return
|
|
local cleaned
|
|
cleaned=$(echo "$choices" | tr -d '"')
|
|
# BH-004: Convert to array to avoid word splitting and injection.
|
|
local -a _pkgs=()
|
|
while IFS= read -r _pkg; do
|
|
[ -n "$_pkg" ] && _pkgs+=("$_pkg")
|
|
done < <(echo "$cleaned" | tr ' ' '\n')
|
|
# Pre-apply summary: confirm the selection once,
|
|
# before any apt transaction starts.
|
|
_confirm_install_list "Fonts (Bullseye)" "${_pkgs[@]}" || return
|
|
for pkg in "${_pkgs[@]}"; do
|
|
! is_installed "$pkg" && _run_install "$pkg" || echo "$pkg already installed."
|
|
done
|
|
|
|
# Release the per-package prompt suppression.
|
|
_SELECTION_CONFIRMED=0
|
|
echo -e "${GREEN}Fonts installed.${NC}"
|
|
}
|
|
|
|
_cat_download_bullseye() {
|
|
local choices1 choices2=""
|
|
|
|
local item_count1=2
|
|
local lista_alto1=$((item_count1 > TUI_ALTO_LISTA ? TUI_ALTO_LISTA : item_count1))
|
|
choices1=$(
|
|
_checklist "Downloaders" "Check [*] the packages you want installed/updated on your system.\n" $TUI_ALTO $TUI_ANCHO $lista_alto1 \
|
|
"aria2" "Multiprotocol downloader (CLI)" "$(_state aria2)" \
|
|
"filezilla" "FTP/SFTP client (GUI)" "$(_state filezilla)"
|
|
)
|
|
clear
|
|
|
|
local item_count2=8
|
|
local lista_alto2=$((item_count2 > TUI_ALTO_LISTA ? TUI_ALTO_LISTA : item_count2))
|
|
choices2=$(
|
|
_checklist "Torrent Clients" "Check [*] the packages you want installed/updated on your system.\n" $TUI_ALTO $TUI_ANCHO $lista_alto2 \
|
|
"deluge" "BitTorrent client (GTK)" "$(_state deluge)" \
|
|
"deluged" "BitTorrent daemon/server" "$(_state deluged)" \
|
|
"mktorrent" "Torrent metainfo creator (CLI)" "$(_state mktorrent)" \
|
|
"qbittorrent" "BitTorrent client (Qt)" "$(_state qbittorrent)" \
|
|
"qbittorrent-nox" "BitTorrent WebUI/CLI" "$(_state qbittorrent-nox)" \
|
|
"transmission-cli" "BitTorrent client (CLI)" "$(_state transmission-cli)" \
|
|
"transmission-gtk" "BitTorrent client (GTK)" "$(_state transmission-gtk)" \
|
|
"transmission-qt" "BitTorrent client (Qt)" "$(_state transmission-qt)"
|
|
)
|
|
clear
|
|
|
|
local cleaned
|
|
cleaned=$(echo "$choices1 $choices2" | tr -d '"')
|
|
[ -z "$cleaned" ] && {
|
|
echo "No download tools selected."
|
|
return
|
|
}
|
|
|
|
# BH-004: Convert to array to avoid word splitting and injection.
|
|
local -a _pkgs=()
|
|
while IFS= read -r _pkg; do
|
|
[ -n "$_pkg" ] && _pkgs+=("$_pkg")
|
|
done < <(echo "$cleaned" | tr ' ' '\n')
|
|
# Pre-apply summary: confirm the selection once,
|
|
# before any apt transaction starts.
|
|
_confirm_install_list "Downloaders & Torrent Clients (Bullseye)" "${_pkgs[@]}" || return
|
|
for pkg in "${_pkgs[@]}"; do
|
|
if ! is_installed "$pkg"; then
|
|
_run_install "$pkg"
|
|
else
|
|
echo "$pkg already installed."
|
|
fi
|
|
done
|
|
|
|
# Release the per-package prompt suppression.
|
|
_SELECTION_CONFIRMED=0
|
|
echo -e "${GREEN}Download & network tools installed.${NC}"
|
|
}
|
|
|
|
_cat_internet_bullseye() {
|
|
local item_count=11
|
|
local lista_alto=$((item_count > TUI_ALTO_LISTA ? TUI_ALTO_LISTA : item_count))
|
|
local choices
|
|
choices=$(
|
|
_checklist "Internet (Bullseye)" "Check [*] the packages you want installed/updated on your system.\n" $TUI_ALTO $TUI_ANCHO $lista_alto \
|
|
"chromium" "Chromium web browser" "$(_state chromium)" \
|
|
"dillo" "Lightweight graphical browser" "$(_state dillo)" \
|
|
"elinks" "Text-mode web browser" "$(_state elinks)" \
|
|
"epiphany-browser" "GNOME web browser" "$(_state epiphany-browser)" \
|
|
"falkon" "KDE web browser (QtWebEngine)" "$(_state falkon)" \
|
|
"firefox-esr" "Firefox ESR (official Debian)" "$(_state firefox-esr)" \
|
|
"konqueror" "KDE file manager / web browser" "$(_state konqueror)" \
|
|
"qutebrowser" "Keyboard-driven browser (Qt)" "$(_state qutebrowser)" \
|
|
"thunderbird" "Email client" "$(_state thunderbird)" \
|
|
"torbrowser-launcher" "Tor Browser launcher" "$(_state torbrowser-launcher)" \
|
|
"w3m" "Text-mode browser + deps" "$(_state w3m)"
|
|
)
|
|
clear
|
|
[ -z "$choices" ] && return
|
|
local cleaned
|
|
cleaned=$(echo "$choices" | tr -d '"')
|
|
# BH-004: Convert to array to avoid word splitting and injection.
|
|
local -a _pkgs=()
|
|
while IFS= read -r _pkg; do
|
|
[ -n "$_pkg" ] && _pkgs+=("$_pkg")
|
|
done < <(echo "$cleaned" | tr ' ' '\n')
|
|
# Pre-apply summary: confirm the selection once,
|
|
# before any apt transaction starts.
|
|
_confirm_install_list "Internet (Bullseye)" "${_pkgs[@]}" || return
|
|
for pkg in "${_pkgs[@]}"; do
|
|
case $pkg in
|
|
w3m)
|
|
local need=()
|
|
! is_installed "w3m" && need+=("w3m")
|
|
! is_installed "w3m-img" && need+=("w3m-img")
|
|
! is_installed "ca-certificates" && need+=("ca-certificates")
|
|
! is_installed "xsel" && need+=("xsel")
|
|
[ ${#need[@]} -gt 0 ] && _run_install_batch "${need[@]}" || echo "Already installed."
|
|
;;
|
|
*)
|
|
if ! is_installed "$pkg"; then
|
|
_run_install "$pkg"
|
|
else
|
|
echo "$pkg already installed."
|
|
fi
|
|
;;
|
|
esac
|
|
done
|
|
|
|
# Release the per-package prompt suppression.
|
|
_SELECTION_CONFIRMED=0
|
|
echo -e "${GREEN}Internet tools installed.${NC}"
|
|
}
|
|
|
|
_cat_players_bullseye() {
|
|
local item_count=2
|
|
local lista_alto=$((item_count > TUI_ALTO_LISTA ? TUI_ALTO_LISTA : item_count))
|
|
local choices
|
|
choices=$(
|
|
_checklist "Media Players (Bullseye)" "Check [*] the packages you want installed/updated on your system.\n" $TUI_ALTO $TUI_ANCHO $lista_alto \
|
|
"mpv" "Lightweight media player" "$(_state mpv)" \
|
|
"vlc" "VLC media player" "$(_state vlc)"
|
|
)
|
|
clear
|
|
[ -z "$choices" ] && return
|
|
local cleaned
|
|
cleaned=$(echo "$choices" | tr -d '"')
|
|
# BH-004: Convert to array to avoid word splitting and injection.
|
|
local -a _pkgs=()
|
|
while IFS= read -r _pkg; do
|
|
[ -n "$_pkg" ] && _pkgs+=("$_pkg")
|
|
done < <(echo "$cleaned" | tr ' ' '\n')
|
|
# Pre-apply summary: confirm the selection once,
|
|
# before any apt transaction starts.
|
|
_confirm_install_list "Media Players (Bullseye)" "${_pkgs[@]}" || return
|
|
for pkg in "${_pkgs[@]}"; do
|
|
if ! is_installed "$pkg"; then
|
|
_run_install "$pkg"
|
|
else
|
|
echo "$pkg already installed."
|
|
fi
|
|
done
|
|
|
|
# Release the per-package prompt suppression.
|
|
_SELECTION_CONFIRMED=0
|
|
echo -e "${GREEN}Media players installed.${NC}"
|
|
}
|
|
|
|
_cat_design_bullseye() {
|
|
local item_count=13
|
|
local lista_alto=$((item_count > TUI_ALTO_LISTA ? TUI_ALTO_LISTA : item_count))
|
|
local choices
|
|
choices=$(
|
|
_checklist "Multimedia & Design (Bullseye)" "Check [*] the packages you want installed/updated on your system.\n" $TUI_ALTO $TUI_ANCHO $lista_alto \
|
|
"ardour" "Digital audio workstation" "$(_state ardour)" \
|
|
"audacity" "Audio editor/recorder" "$(_state audacity)" \
|
|
"blender" "3D modeling/animation suite" "$(_state blender)" \
|
|
"ffmpeg" "Multimedia framework (CLI)" "$(_state ffmpeg)" \
|
|
"gimp" "Image editor" "$(_state gimp)" \
|
|
"handbrake" "Video transcoder (DVD ripper)" "$(_state handbrake)" \
|
|
"inkscape" "Vector graphics editor" "$(_state inkscape)" \
|
|
"kdenlive" "Video editor (KDE)" "$(_state kdenlive)" \
|
|
"krita" "Digital painting/illustration" "$(_state krita)" \
|
|
"obs-studio" "Screen recording/streaming" "$(_state obs-studio)" \
|
|
"openshot-qt" "Video editor (simple)" "$(_state openshot-qt)" \
|
|
"scribus" "Desktop publishing (DTP)" "$(_state scribus)" \
|
|
"shotcut" "Video editor (cross-platform)" "$(_state shotcut)"
|
|
)
|
|
clear
|
|
[ -z "$choices" ] && return
|
|
local cleaned
|
|
cleaned=$(echo "$choices" | tr -d '"')
|
|
# BH-004: Convert to array to avoid word splitting and injection.
|
|
local -a _pkgs=()
|
|
while IFS= read -r _pkg; do
|
|
[ -n "$_pkg" ] && _pkgs+=("$_pkg")
|
|
done < <(echo "$cleaned" | tr ' ' '\n')
|
|
# Pre-apply summary: confirm the selection once,
|
|
# before any apt transaction starts.
|
|
_confirm_install_list "Multimedia & Design (Bullseye)" "${_pkgs[@]}" || return
|
|
for pkg in "${_pkgs[@]}"; do
|
|
if ! is_installed "$pkg"; then
|
|
_run_install "$pkg"
|
|
else
|
|
echo "$pkg already installed."
|
|
fi
|
|
done
|
|
|
|
# Release the per-package prompt suppression.
|
|
_SELECTION_CONFIRMED=0
|
|
echo -e "${GREEN}Multimedia & design tools installed.${NC}"
|
|
}
|
|
|
|
_cat_programming_bullseye() {
|
|
local item_count=9
|
|
local lista_alto=$((item_count > TUI_ALTO_LISTA ? TUI_ALTO_LISTA : item_count))
|
|
local choices
|
|
choices=$(
|
|
_checklist "Code Editors & IDEs (Bullseye)" "Check [*] the packages you want installed/updated on your system.\n" $TUI_ALTO $TUI_ANCHO $lista_alto \
|
|
"vim" "Classic terminal editor" "$(_state vim)" \
|
|
"vim-gtk3" "Vim with GTK3 GUI" "$(_state vim-gtk3)" \
|
|
"neovim" "Modern vim fork" "$(_state neovim)" \
|
|
"nano" "Simple terminal editor" "$(_state nano)" \
|
|
"emacs" "Extensible editor / IDE" "$(_state emacs)" \
|
|
"kate" "KDE advanced text editor" "$(_state kate)" \
|
|
"mousepad" "Xfce text editor" "$(_state mousepad)" \
|
|
"gedit" "GNOME text editor" "$(_state gedit)" \
|
|
"geany" "Lightweight IDE" "$(_state geany)"
|
|
)
|
|
clear
|
|
[ -z "$choices" ] && return
|
|
local cleaned
|
|
cleaned=$(echo "$choices" | tr -d '"')
|
|
# BH-004: Convert to array to avoid word splitting and injection.
|
|
local -a _pkgs=()
|
|
while IFS= read -r _pkg; do
|
|
[ -n "$_pkg" ] && _pkgs+=("$_pkg")
|
|
done < <(echo "$cleaned" | tr ' ' '\n')
|
|
# Pre-apply summary: confirm the selection once,
|
|
# before any apt transaction starts.
|
|
_confirm_install_list "Code Editors & IDEs (Bullseye)" "${_pkgs[@]}" || return
|
|
for pkg in "${_pkgs[@]}"; do
|
|
if ! is_installed "$pkg"; then
|
|
_run_install "$pkg"
|
|
else
|
|
echo "$pkg already installed."
|
|
fi
|
|
done
|
|
|
|
# Release the per-package prompt suppression.
|
|
_SELECTION_CONFIRMED=0
|
|
echo -e "${GREEN}Code editors & IDEs installed.${NC}"
|
|
}
|
|
|
|
_cat_dev_bullseye() {
|
|
local item_count=14
|
|
local lista_alto=$((item_count > TUI_ALTO_LISTA ? TUI_ALTO_LISTA : item_count))
|
|
local choices
|
|
choices=$(
|
|
_checklist "Servers & Dev Tools (Bullseye)" "Check [*] the packages you want installed/updated on your system.\n" $TUI_ALTO $TUI_ANCHO $lista_alto \
|
|
"apache2" "Apache web server" "$(_state apache2)" \
|
|
"build-essential" "C/C++ build tools (gcc, make)" "$(_state build-essential)" \
|
|
"docker" "Docker container runtime" "$(_state docker.io)" \
|
|
"mariadb-server" "MariaDB database server" "$(_state mariadb-server)" \
|
|
"netcat-openbsd" "TCP/IP networking utility" "$(_state netcat-openbsd)" \
|
|
"nginx" "Nginx web server" "$(_state nginx)" \
|
|
"openssh-server" "SSH server" "$(_state openssh-server)" \
|
|
"openssl" "OpenSSL cryptography toolkit" "$(_state openssl)" \
|
|
"postgresql" "PostgreSQL database server" "$(_state postgresql)" \
|
|
"python3-pip" "Python 3 pip + venv + dev" "$(_state python3-pip)" \
|
|
"redis-server" "Redis key-value store" "$(_state redis-server)" \
|
|
"sqlite3" "SQLite database engine" "$(_state sqlite3)" \
|
|
"jellyfin" "Jellyfin Media Server (Web GUI on port 8096)" OFF \
|
|
"openjdk-dev-env" "Adoptium Temurin JDK (17, 21, 25 LTS)$(_any_jdk_installed_desc)" "$(_any_jdk_state)"
|
|
)
|
|
clear
|
|
[ -z "$choices" ] && return
|
|
local cleaned
|
|
cleaned=$(echo "$choices" | tr -d '"')
|
|
# BH-004: Convert to array to avoid word splitting and injection.
|
|
local -a _pkgs=()
|
|
while IFS= read -r _pkg; do
|
|
[ -n "$_pkg" ] && _pkgs+=("$_pkg")
|
|
done < <(echo "$cleaned" | tr ' ' '\n')
|
|
# Pre-apply summary: confirm the selection once,
|
|
# before any apt transaction starts.
|
|
_confirm_install_list "Servers & Dev Tools (Bullseye)" "${_pkgs[@]}" || return
|
|
for pkg in "${_pkgs[@]}"; do
|
|
case $pkg in
|
|
docker)
|
|
local need=()
|
|
! is_installed "docker.io" && need+=("docker.io")
|
|
! is_installed "docker-compose" && need+=("docker-compose")
|
|
if [ ${#need[@]} -gt 0 ]; then
|
|
_run_install_batch "${need[@]}"
|
|
else
|
|
echo "Docker already installed."
|
|
fi
|
|
;;
|
|
python3-pip)
|
|
local need=()
|
|
! is_installed "python3-pip" && need+=("python3-pip")
|
|
! is_installed "python3-venv" && need+=("python3-venv")
|
|
! is_installed "python3-dev" && need+=("python3-dev")
|
|
if [ ${#need[@]} -gt 0 ]; then
|
|
_run_install_batch "${need[@]}"
|
|
else
|
|
echo "Python 3 tools already installed."
|
|
fi
|
|
;;
|
|
jellyfin)
|
|
install_jellyfin
|
|
;;
|
|
openjdk-dev-env)
|
|
_install_dev_java
|
|
;;
|
|
|
|
*)
|
|
if ! is_installed "$pkg"; then
|
|
_run_install "$pkg"
|
|
else
|
|
echo "$pkg already installed."
|
|
fi
|
|
;;
|
|
esac
|
|
done
|
|
|
|
# Release the per-package prompt suppression.
|
|
_SELECTION_CONFIRMED=0
|
|
echo -e "${GREEN}Servers & dev tools installed.${NC}"
|
|
}
|
|
_cat_security_bullseye() {
|
|
local item_count=5
|
|
local lista_alto=$((item_count > TUI_ALTO_LISTA ? TUI_ALTO_LISTA : item_count))
|
|
local choices
|
|
choices=$(
|
|
_checklist "Security & Networking (Bullseye)" "Check [*] the packages you want installed/updated on your system.\n" $TUI_ALTO $TUI_ANCHO $lista_alto \
|
|
"wireshark" "Network protocol analyzer (GUI)" "$(_state wireshark)" \
|
|
"tcpdump" "Command-line packet analyzer" "$(_state tcpdump)" \
|
|
"fail2ban" "Brute-force protection daemon" "$(_state fail2ban)" \
|
|
"ufw" "Uncomplicated firewall" "$(_state ufw)" \
|
|
"clamav" "Antivirus engine (ClamAV)" "$(_state clamav)"
|
|
)
|
|
clear
|
|
[ -z "$choices" ] && return
|
|
local cleaned
|
|
cleaned=$(echo "$choices" | tr -d '"')
|
|
# BH-004: Convert to array to avoid word splitting and injection.
|
|
local -a _pkgs=()
|
|
while IFS= read -r _pkg; do
|
|
[ -n "$_pkg" ] && _pkgs+=("$_pkg")
|
|
done < <(echo "$cleaned" | tr ' ' '\n')
|
|
# Pre-apply summary: confirm the selection once,
|
|
# before any apt transaction starts.
|
|
_confirm_install_list "Security & Networking (Bullseye)" "${_pkgs[@]}" || return
|
|
for pkg in "${_pkgs[@]}"; do
|
|
case $pkg in
|
|
clamav)
|
|
_install_clamav
|
|
;;
|
|
*)
|
|
if ! is_installed "$pkg"; then
|
|
_run_install "$pkg"
|
|
else
|
|
echo "$pkg already installed."
|
|
fi
|
|
;;
|
|
esac
|
|
done
|
|
|
|
# Release the per-package prompt suppression.
|
|
_SELECTION_CONFIRMED=0
|
|
echo -e "${GREEN}Security & networking tools installed.${NC}"
|
|
}
|
|
|
|
_cat_general_bullseye() {
|
|
local item_count=22
|
|
local lista_alto=$((item_count > TUI_ALTO_LISTA ? TUI_ALTO_LISTA : item_count))
|
|
local choices
|
|
choices=$(
|
|
_checklist "System Tools (Bullseye)" "Check [*] the packages you want installed/updated on your system.\n" $TUI_ALTO $TUI_ANCHO $lista_alto \
|
|
"compress" "Compression tools (zip, unrar, p7zip)" "$(_state zip)" \
|
|
"conky-all" "System monitor for desktop" "$(_state conky-all)" \
|
|
"cpu-x" "CPU-X (alternative to CPU-Z)" "$(_state cpu-x)" \
|
|
"curl-wget" "HTTP transfer tools (curl, wget)" "$(_state curl)" \
|
|
"flatpak" "Flatpak sandbox (Bullseye native)" "$(_state flatpak)" \
|
|
"fwupd" "Firmware update daemon" "$(_state fwupd)" \
|
|
"gnome-disk-utility" "Disk management GUI" "$(_state gnome-disk-utility)" \
|
|
"gparted" "Partition editor" "$(_state gparted)" \
|
|
"htop" "Interactive process viewer" "$(_state htop)" \
|
|
"inxi" "System information tool" "$(_state inxi)" \
|
|
"jq" "JSON command-line processor" "$(_state jq)" \
|
|
"kvm" "QEMU/KVM virtualization" "$(_state virt-manager)" \
|
|
"lshw" "List hardware details" "$(_state lshw)" \
|
|
"mc" "Midnight Commander" "$(_state mc)" \
|
|
"nvme-cli" "NVMe SSD health monitoring" "$(_state nvme-cli)" \
|
|
"ncdu" "Disk usage analyzer" "$(_state ncdu)" \
|
|
"psensor" "Temperature monitor" "$(_state psensor)" \
|
|
"timeshift" "System restore snapshots" "$(_state timeshift)" \
|
|
"tmux" "Terminal multiplexer" "$(_state tmux)" \
|
|
"wine" "Windows compatibility layer" "$(_state wine)" \
|
|
"bleachbit" "System cleaner (GUI)" "$(_state bleachbit)" \
|
|
"gdebi" "Install .deb packages with deps (GUI)" "$(_state gdebi)"
|
|
)
|
|
clear
|
|
[ -z "$choices" ] && return
|
|
local cleaned
|
|
cleaned=$(echo "$choices" | tr -d '"')
|
|
# BH-004: Convert to array to avoid word splitting and injection.
|
|
local -a _pkgs=()
|
|
while IFS= read -r _pkg; do
|
|
[ -n "$_pkg" ] && _pkgs+=("$_pkg")
|
|
done < <(echo "$cleaned" | tr ' ' '\n')
|
|
# Pre-apply summary: confirm the selection once,
|
|
# before any apt transaction starts.
|
|
_confirm_install_list "System Tools (Bullseye)" "${_pkgs[@]}" || return
|
|
for pkg in "${_pkgs[@]}"; do
|
|
case $pkg in
|
|
compress)
|
|
local need=()
|
|
! is_installed "zip" && need+=("zip")
|
|
! is_installed "unzip" && need+=("unzip")
|
|
! is_installed "rar" && need+=("rar")
|
|
! is_installed "unrar" && need+=("unrar")
|
|
! is_installed "p7zip-full" && need+=("p7zip-full")
|
|
! is_installed "p7zip-rar" && need+=("p7zip-rar")
|
|
[ ${#need[@]} -gt 0 ] && _run_install_batch "${need[@]}"
|
|
;;
|
|
curl-wget)
|
|
local need=()
|
|
! is_installed "curl" && need+=("curl")
|
|
! is_installed "wget" && need+=("wget")
|
|
[ ${#need[@]} -gt 0 ] && _run_install_batch "${need[@]}" || echo "Already installed."
|
|
;;
|
|
kvm)
|
|
if ! is_installed "virt-manager"; then
|
|
_run_cmd "KVM" "sudo apt install -y qemu-system-x86 qemu-utils libvirt-daemon-system libvirt-clients bridge-utils virt-manager" "Installing KVM..."
|
|
sudo adduser "$USER" libvirt 2>/dev/null || true
|
|
sudo adduser "$USER" kvm 2>/dev/null || true
|
|
else
|
|
echo "QEMU/KVM already installed."
|
|
fi
|
|
;;
|
|
flatpak)
|
|
if ! is_installed "flatpak"; then
|
|
_run_cmd "Flatpak" "sudo apt install -y flatpak" "Installing Flatpak..."
|
|
flatpak remote-add --if-not-exists flathub \
|
|
https://dl.flathub.org/repo/flathub.flatpakrepo
|
|
echo -e "${GREEN}Flatpak + Flathub installed.${NC}"
|
|
else
|
|
echo "Flatpak already installed."
|
|
fi
|
|
;;
|
|
wine)
|
|
if ! is_installed "wine64"; then
|
|
_run_cmd "Wine" "sudo apt install -y --no-install-recommends wine64 fonts-wine" "Installing Wine (64-bit only)..."
|
|
local wine_ver
|
|
wine_ver=$(wine --version 2>/dev/null)
|
|
if [ -n "$wine_ver" ]; then
|
|
echo -e "${GREEN}Wine (64-bit) installed: ${wine_ver}${NC}"
|
|
else
|
|
echo -e "${YELLOW}Wine installed but version check failed.${NC}"
|
|
fi
|
|
else
|
|
echo "Wine64 already installed."
|
|
fi
|
|
;;
|
|
fwupd)
|
|
if ! is_installed "fwupd"; then
|
|
_run_cmd "fwupd" "sudo apt install -y fwupd" "Installing fwupd..."
|
|
fi
|
|
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)
|
|
_run_install "nvme-cli"
|
|
;;
|
|
*)
|
|
if ! is_installed "$pkg"; then
|
|
_run_install "$pkg"
|
|
else
|
|
echo "$pkg already installed."
|
|
fi
|
|
;;
|
|
esac
|
|
done
|
|
|
|
# Release the per-package prompt suppression.
|
|
_SELECTION_CONFIRMED=0
|
|
echo -e "${GREEN}System tools installed.${NC}"
|
|
_pause
|
|
}
|
|
|
|
_cat_fetch_bullseye() {
|
|
local items=(
|
|
"neofetch" "System info fetcher" "$(_state neofetch)"
|
|
"screenfetch" "System info (BSD/Linux)" "$(_state screenfetch)"
|
|
"linuxlogo" "Linux logo + system info" "$(_state linuxlogo)"
|
|
)
|
|
local item_count=${#items[@]}
|
|
local lista_alto=$((item_count > TUI_ALTO_LISTA ? TUI_ALTO_LISTA : item_count))
|
|
local choices
|
|
choices=$(_checklist "Fetch Tools (Bullseye)" "Select system info tools:" $TUI_ALTO $TUI_ANCHO $lista_alto \
|
|
"${items[@]}")
|
|
clear
|
|
[ -z "$choices" ] && return
|
|
local cleaned
|
|
cleaned=$(echo "$choices" | tr -d '"')
|
|
# BH-004: Convert to array to avoid word splitting and injection.
|
|
local -a _pkgs=()
|
|
while IFS= read -r _pkg; do
|
|
[ -n "$_pkg" ] && _pkgs+=("$_pkg")
|
|
done < <(echo "$cleaned" | tr ' ' '\n')
|
|
# Pre-apply summary: confirm the selection once,
|
|
# before any apt transaction starts.
|
|
_confirm_install_list "Fetch Tools (Bullseye)" "${_pkgs[@]}" || return
|
|
for pkg in "${_pkgs[@]}"; do
|
|
if ! is_installed "$pkg"; then
|
|
_run_install "$pkg"
|
|
else
|
|
echo "$pkg already installed."
|
|
fi
|
|
done
|
|
|
|
# Release the per-package prompt suppression.
|
|
_SELECTION_CONFIRMED=0
|
|
echo -e "${GREEN}Fetch tools installed.${NC}"
|
|
}
|
|
|
|
# ======================================================================
|
|
# master installer — replaces install_extras() on Bullseye
|
|
# ======================================================================
|
|
install_extras_bullseye() {
|
|
echo -e "${YELLOW}Extra software — Bullseye mode (official repos only).${NC}"
|
|
_load_extras
|
|
|
|
while true; do
|
|
local cat_choice
|
|
cat_choice=$(
|
|
_menu "Extra Software — Bullseye" "Select a category:" $TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
|
|
"0" "Essential Pack" \
|
|
"1" "Customization System" \
|
|
"2" "Download & Network" \
|
|
"3" "Internet (Browsers, Email)" \
|
|
"4" "Communication" \
|
|
"5" "Media Players" \
|
|
"6" "Multimedia & Design" \
|
|
"7" "Code Editors & IDEs" \
|
|
"8" "Servers & Dev Tools" \
|
|
"9" "Security & Networking" \
|
|
"10" "Software Centers" \
|
|
"11" "System Tools" \
|
|
"12" "Fetch / System Info" \
|
|
"13" "Back to main menu"
|
|
)
|
|
|
|
[ -z "$cat_choice" ] && return
|
|
clear
|
|
|
|
case "$cat_choice" in
|
|
0) _quick_install_bullseye ;;
|
|
1) _cat_customization_bullseye ;;
|
|
2) _cat_download_bullseye ;;
|
|
3) _cat_internet_bullseye ;;
|
|
4) _cat_communication ;;
|
|
5) _cat_players_bullseye ;;
|
|
6) _cat_design_bullseye ;;
|
|
7) _cat_programming_bullseye ;;
|
|
8) _cat_dev_bullseye ;;
|
|
9) _cat_security_bullseye ;;
|
|
10) _cat_software_centers_bullseye ;;
|
|
11) _cat_general_bullseye ;;
|
|
12) _cat_fetch_bullseye ;;
|
|
13) return ;;
|
|
esac
|
|
clear
|
|
done
|
|
}
|
|
|
|
_cat_software_centers_bullseye() {
|
|
local sc_choice
|
|
sc_choice=$(
|
|
_menu "Software Centers" "Choose a software store to install:" 12 65 3 \
|
|
"gnome-software" "Software Center for GNOME" \
|
|
"plasma-discover" "Software manager for Plasma" \
|
|
"synaptic" "Classic APT package manager (GTK)"
|
|
)
|
|
[ -z "$sc_choice" ] && return
|
|
|
|
if [ "$sc_choice" = "synaptic" ]; then
|
|
_run_cmd "Install" "sudo apt install -y synaptic" "Installing synaptic..."
|
|
echo -e "${GREEN}synaptic installed.${NC}"
|
|
return
|
|
fi
|
|
|
|
_run_cmd "Install" "sudo apt install -y $sc_choice" "Installing ${sc_choice}..."
|
|
|
|
if _confirm "Flatpak Support" "Do you want to enable Flatpak support for this software center?"; then
|
|
local bpkg
|
|
if [ "$sc_choice" = "gnome-software" ]; then
|
|
bpkg="gnome-software-plugin-flatpak"
|
|
else
|
|
bpkg="plasma-discover-backend-flatpak"
|
|
fi
|
|
if ! is_installed "flatpak"; then
|
|
_run_cmd "Flatpak" "sudo apt install -y flatpak" "Installing Flatpak..."
|
|
fi
|
|
_run_cmd "Plugin" "sudo apt install -y $bpkg" "Installing $bpkg..."
|
|
flatpak remote-add --if-not-exists flathub \
|
|
https://dl.flathub.org/repo/flathub.flatpakrepo
|
|
echo "Flathub repository added."
|
|
fi
|
|
|
|
echo -e "${GREEN}Software store installed.${NC}"
|
|
}
|