#!/usr/bin/env bash
# rustimal status line for Claude Code. Regenerated on every launch.
# Claude pipes its session JSON (model, context, rate limits, ...) on stdin;
# we hand it to rustimal, which draws its own usage bar under the pane.
input=$(cat)
if [ -n "$RUSTIMAL_STATE" ] && [ -n "$RUSTIMAL_PANE" ]; then
    f="$RUSTIMAL_STATE/claude-$RUSTIMAL_PANE.json"
    printf '%s' "$input" >"$f.tmp" && mv -f "$f.tmp" "$f"
fi
# Claude's own status row stays empty; rustimal shows the data instead.
printf ' '
