# ── tmux : config validity + target segment ────────────────────────────────── assert_ok "tmux.conf loads" bash -c 'command -v tmux >/dev/null && tmux -f "$DOTFILES/.tmux.conf" new-session -d -s _t 2>/dev/null && tmux kill-session -t _t 2>/dev/null || ! command -v tmux >/dev/null' # target helper prints the htbbox target when one is set, nothing otherwise () { local d; d="$(mktemp -d)"; mkdir -p "$d/htb" print -r -- photon > "$d/htb/box"; print -r -- 10.10.11.10 > "$d/htb/target" assert_contains "tmux target segment shows box" "$(XDG_STATE_HOME=$d bash $DOTFILES/scripts/tmux-target.sh)" "photon" rm -f "$d/htb/box" "$d/htb/target" assert_eq "tmux target segment empty when no target" "" "$(XDG_STATE_HOME=$d bash $DOTFILES/scripts/tmux-target.sh)" rm -rf "$d" } assert_ok "tmux-htb fn defined" zsh -ic 'source $DOTFILES/.zshrc 2>/dev/null; typeset -f tmux-htb >/dev/null'