mirror of
https://github.com/stornic56/debianito-post-install.git
synced 2026-10-31 13:08:06 +00:00
LXDE: add Custom packages option and respect existing display manager
- New 'LXDE Custom (Choose packages)' menu entry: fixed base (lxde-core + xserver-xorg, lightdm only when no display manager is configured) plus a data-driven checklist of 16 extras. - lxterminal, polkitd, notification-daemon and light-locker stay out of the checklist: they arrive via lxde-core Recommends (verified against packages.debian.org/trixie, 2026-10-16). - Full/Core/Custom now honor an already-configured display manager via _existing_display_manager (GNOME/KDE pattern): no debconf preseed, no lightdm install, no enable over an existing DM. - Extract _select_packages_checklist helper to utils.sh; XFCE Custom consumes it with no functional change. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -805,6 +805,28 @@ _confirm_install_list() {
|
||||
return 1
|
||||
}
|
||||
|
||||
# Show a multi-select checklist of packages and return the
|
||||
# selection as a space-separated string ("" on cancel/Esc).
|
||||
# Args: title prompt "pkg|description" [pkg|description ...]
|
||||
# Already-installed packages are pre-checked via _state.
|
||||
_select_packages_checklist() {
|
||||
local title="$1" prompt="$2"
|
||||
shift 2
|
||||
local -a items=() entry
|
||||
for entry in "$@"; do
|
||||
local pkg="${entry%%|*}"
|
||||
items+=("$pkg" "${entry#*|}" "$(_state "$pkg")")
|
||||
done
|
||||
local choices
|
||||
# _checklist swallows whiptail's cancel (Esc) exit code
|
||||
# via `|| true`, so a cancelled dialog looks like an empty
|
||||
# selection here; an empty result means "nothing to install".
|
||||
choices=$(_checklist "$title" "$prompt" \
|
||||
$TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA "${items[@]}")
|
||||
choices=$(echo "$choices" | tr -d '"')
|
||||
echo "$choices"
|
||||
}
|
||||
|
||||
# Install a package with confirmation prompt.
|
||||
# Handles set -e: failures are caught and reported, not fatal.
|
||||
_install_pkg() {
|
||||
|
||||
Reference in New Issue
Block a user