From d4a7b5a60e4cb4e97a0b19e30fe3c05af98d2ef8 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 10 Aug 2026 16:23:35 +0000 Subject: [PATCH] Add a fake header row and size the checklist width to the terminal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Header row: a first, non-functional checklist entry using the exact same printf field widths as the real rows ("x # NAME" / "x 1 caddy" / ...), so it visually reads as column headers for the x/# prefix even though whiptail has no real header concept. Its sentinel tag ("NAME") is filtered back out of the selection after the dialog closes, so it's harmless even if someone checks it and hits . Width: was a flat 78 regardless of the actual terminal, so descriptions got cut off mid-sentence on anything wider with no way to read the rest (confirmed from a screenshot — "TURN via the shared coturn s..." trailing off). Scale with tput cols instead, floored at the old 78 (safe on a plain 80-column terminal) and capped at 160 so a very wide terminal doesn't get an absurdly wide dialog. --- setup.sh | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/setup.sh b/setup.sh index 5ec5103..7fc1a69 100755 --- a/setup.sh +++ b/setup.sh @@ -414,13 +414,23 @@ while true; do # for a non-terminal/unknown size) so this can't request a dialog # taller than the screen. _term_lines="$(tput lines 2>/dev/null silently + # correct even if someone does check it out of habit. + svc_items+=("$(printf "%s %s %s" "x" "$(printf '%-2s' '#')" "NAME")" "── service ──" "OFF") for name in "${SVCS[@]}"; do _inst_mark=" " _count_str=" " @@ -445,12 +462,15 @@ while true; do svc_items+=("$svc_tag" "${SERVICE_DESC[$name]}" "OFF") done CHOICE=$(whiptail --title "${CHOSEN_CAT^^}" --checklist \ - "installed(x) #instances name Space=select to install, Enter=go:" "$_box_h" 78 "$_list_h" \ + "Space=select to install, Enter=go. Top row shows the x/# column meaning:" "$_box_h" "$_box_w" "$_list_h" \ "${svc_items[@]}" 3>&1 1>&2 2>&3