From 2c5306a5c4cee22bced1061bc5ff999eb21a3dde Mon Sep 17 00:00:00 2001 From: Graeme Foster <80714+GraemeF@users.noreply.github.com> Date: Wed, 25 Nov 2026 17:13:58 +0000 Subject: [PATCH] feat(berth): name a berth's pane in the herdr app window --- bin/berth-herdr-app | 35 ++++++++++++++++++++++++++++------- docs/design.md | 2 +- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/bin/berth-herdr-app b/bin/berth-herdr-app index 2b4deaa..5e01518 100755 --- a/bin/berth-herdr-app +++ b/bin/berth-herdr-app @@ -142,9 +142,13 @@ worker_tab() { # # labels yet, so a refusal is tried again for a while. window_wait_seconds=5 +window_open() { + command -v herdr-app >/dev/null && herdr-app status >/dev/null 2>&1 +} + window() { # ... local out deadline=$((SECONDS + window_wait_seconds)) - command -v herdr-app >/dev/null && herdr-app status >/dev/null 2>&1 || return 0 + window_open || return 0 until out=$(herdr-app "do" "$@" 2>&1); do if [ "$SECONDS" -ge "$deadline" ]; then echo "berth (herdr-app): the window refused $1: $out" >&2 @@ -154,16 +158,33 @@ window() { # ... done } -# Names whatever an independent berth's place gives it: the space and its -# first tab for one opened apart, and the tab for one opened in a tab. The -# window takes a command with no id to mean what it shows, so a berth that -# the window does not show names nothing. +# pane.rename takes a pane, which only the window's listing ties to a +# terminal. +name_pane() { #