#!/usr/bin/env bash # ── Hermes Ops Dashboard v2 ──────────────────────────────────────────── # 4-pane layout with dual agent feeds: # ┌───────────────────────────────────┬────────────────────────────────┐ # │ │ KIMI LIVE FEED │ # │ STATUS + GITEA + QUEUE │ (tail log, colored) │ # │ (auto-refresh 20s) ├────────────────────────────────┤ # │ │ CLAUDE LIVE FEED │ # │ │ (tail log, colored) │ # ├───────────────────────────────────┴────────────────────────────────┤ # │ CONTROLS (bash prompt with helpers loaded) │ # └────────────────────────────────────────────────────────────────────┘ # ─────────────────────────────────────────────────────────────────────── SESSION="ops" tmux kill-session -t "$SESSION" 2>/dev/null tmux new-session -d -s "$SESSION" # Split: left status (55%) | right feeds (45%) tmux split-window -h -p 45 -t "$SESSION" # Split left pane: top status (80%) | bottom controls (20%) tmux split-window -v -p 20 -t "$SESSION:1.1" # Split right pane: top kimi (50%) | bottom claude (50%) tmux split-window -v -p 50 -t "$SESSION:1.2" # Initialize log files if they don't exist touch ~/.hermes/logs/kimi-loop.log 2>/dev/null touch ~/.hermes/logs/claude-loop.log 2>/dev/null # Pane 1 (top-left): consolidated status, auto-refresh tmux send-keys -t "$SESSION:1.1" "watch -n 20 -t -c 'bash ~/.hermes/bin/ops-panel.sh'" Enter # Pane 2 (top-right): kimi live feed with color tmux send-keys -t "$SESSION:1.2" "echo -e '\\033[1m\\033[33m KIMI FEED\\033[0m' && tail -f ~/.hermes/logs/kimi-loop.log | GREP_COLOR='1;32' grep --color=always -E 'SUCCESS|$' | GREP_COLOR='1;31' grep --color=always -E 'FAILED|BACKOFF|$' | GREP_COLOR='1;36' grep --color=always -E 'ISSUE #[0-9]+|$'" Enter # Pane 3 (bottom-right): claude live feed with color tmux send-keys -t "$SESSION:1.3" "echo -e '\\033[1m\\033[35m CLAUDE FEED\\033[0m' && tail -f ~/.hermes/logs/claude-loop.log | GREP_COLOR='1;32' grep --color=always -E 'SUCCESS|$' | GREP_COLOR='1;31' grep --color=always -E 'FAILED|BACKOFF|$' | GREP_COLOR='1;36' grep --color=always -E 'ISSUE #[0-9]+|$'" Enter # Pane 4 (bottom-left): controls with helpers sourced tmux send-keys -t "$SESSION:1.4" "source ~/.hermes/bin/ops-helpers.sh && ops-help" Enter # Set pane titles tmux select-pane -t "$SESSION:1.1" -T "Status" tmux select-pane -t "$SESSION:1.2" -T "Kimi Feed" tmux select-pane -t "$SESSION:1.3" -T "Claude Feed" tmux select-pane -t "$SESSION:1.4" -T "Controls" # Border styling tmux set-option -t "$SESSION" pane-border-status top tmux set-option -t "$SESSION" pane-border-format " #{pane_title} " tmux set-option -t "$SESSION" pane-border-style "fg=colour240" tmux set-option -t "$SESSION" pane-active-border-style "fg=cyan" # Focus on controls pane tmux select-pane -t "$SESSION:1.4" tmux attach -t "$SESSION"