From c7f9e5caa10059105e672ed2a5de24000d45a659 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 10 Aug 2026 16:03:19 +0000 Subject: [PATCH] Add a * marker next to the checkbox for already-installed services MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The [installed] text label (previous commit) confirmed working from a screenshot, but the checkbox itself stays unchecked for installed items by design — checking it means "install/reinstall this on ", so pre-checking every already-installed service would risk a mass reinstall from just hitting Ok without manually unchecking each one. Add a second, more immediate cue right next to the checkbox instead: prefix the item's own tag with "*" when installed (whiptail's checklist tag is the first column, directly after the checkbox). The "*" is display-only — stripped back off the selected values before they reach run_service, so dispatch is unaffected. --- setup.sh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/setup.sh b/setup.sh index 879a3ef..c961ab1 100755 --- a/setup.sh +++ b/setup.sh @@ -402,6 +402,7 @@ while true; do svc_items=() for name in "${SVCS[@]}"; do tag="${SERVICE_DESC[$name]}" + svc_tag="$name" # Marker goes at the FRONT, not appended after the description. # whiptail hard-truncates each row to the dialog's fixed width # (78 here) with no ellipsis or other sign it happened — @@ -412,13 +413,24 @@ while true; do # anything was cut. A long description can still lose its own # tail this way, but that's harmless — the install status is # what actually matters and now always survives. - is_installed "$name" && tag="[installed] $tag" - svc_items+=("$name" "$tag" "OFF") + # Also prefix the name itself with "*" — the checkbox's own + # [ ]/[*] state is reserved for "install this now", so an + # already-installed item stays unchecked by design (checking it + # would reinstall on ); this "*" sits right next to the + # checkbox as a second, harder-to-miss cue distinct from that + # selection state. Stripped back off below before dispatch. + if is_installed "$name"; then + tag="[installed] $tag" + svc_tag="*$name" + fi + svc_items+=("$svc_tag" "$tag" "OFF") done CHOICE=$(whiptail --title "${CHOSEN_CAT^^}" --checklist \ - "Space to select, Enter to install. Already-installed are marked:" "$_box_h" 78 "$_list_h" \ + "Space to select, Enter to install. Already-installed are marked with *:" "$_box_h" 78 "$_list_h" \ "${svc_items[@]}" 3>&1 1>&2 2>&3