mirror of
https://github.com/theniceboy/.config.git
synced 2026-05-11 17:36:05 +08:00
agent tracker + tmux config update
This commit is contained in:
parent
83d01d4a91
commit
cf365fc124
9 changed files with 628 additions and 145 deletions
|
|
@ -104,6 +104,11 @@ if [[ -z "$theme" ]]; then
|
|||
fi
|
||||
now=$(load_option "@op_work_now")
|
||||
question_pending=$(load_option "@op_question_pending")
|
||||
pane_watching=$(load_option "@pane_watching")
|
||||
|
||||
if [[ "$pane_watching" == "1" ]]; then
|
||||
title="⏳ $title"
|
||||
fi
|
||||
|
||||
if ! opencode_active; then
|
||||
if [[ -n "$theme" || -n "$now" || -n "$question_pending" ]]; then
|
||||
|
|
@ -130,6 +135,11 @@ if [[ -z "$summary_display" ]]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "$pane_watching" == "1" ]]; then
|
||||
summary_display="⏳ $summary_display"
|
||||
title=${title#⏳ }
|
||||
fi
|
||||
|
||||
reserved_width=$((${#summary_display} + 3))
|
||||
prompt_width=$((width - reserved_width))
|
||||
if (( prompt_width < 16 )); then
|
||||
|
|
|
|||
|
|
@ -15,6 +15,12 @@ pane_shell=$(ps -o comm= -p "$pane_pid" 2>/dev/null | sed 's|.*/||; s/^-//')
|
|||
current_cmd=$(tmux display-message -p -t "$pane_id" '#{pane_current_command}' 2>/dev/null || true)
|
||||
[[ -z "$current_cmd" ]] && exit 0
|
||||
|
||||
clear_pane_watch() {
|
||||
tmux set-option -p -u -t "$pane_id" @pane_watching 2>/dev/null || true
|
||||
}
|
||||
|
||||
trap clear_pane_watch EXIT
|
||||
|
||||
notify_completion() {
|
||||
local tracker_bin message
|
||||
tracker_bin="$HOME/.config/agent-tracker/bin/agent"
|
||||
|
|
@ -28,6 +34,7 @@ if [[ "$current_cmd" == "$pane_shell" ]]; then
|
|||
fi
|
||||
|
||||
tmux set -w -t "$window_id" @watching 1 2>/dev/null || true
|
||||
tmux set-option -p -t "$pane_id" @pane_watching 1 2>/dev/null || true
|
||||
tmux refresh-client -S
|
||||
|
||||
while true; do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue