Loading...
Loading...
tmux pane operations guide for debugging and monitoring separate panes Use when: - Sending commands to another tmux pane - Capturing output from another tmux pane - Monitoring long-running commands in separate panes - Debugging devcontainer build/up operations - Working with multiple panes in parallel
npx skill4agent add i9wa4/dotfiles tmuxtmux send-keys -t %N "command" Enter%N%33%42"command"Enter"command"Entersleep 1tmux capture-pane -t %N -p-t %N-p# Capture last N lines
tmux capture-pane -t %N -p | tail -N
# Capture first N lines
tmux capture-pane -t %N -p | head -N
# Capture with line range
tmux capture-pane -t %N -p -S -100 -E -1-S-E# Step 1: Send command
tmux send-keys -t %33 "long-running-command" Enter
# Step 2: Wait for initial output
sleep 3
# Step 3: Check progress
tmux capture-pane -t %33 -p | tail -20
# Step 4: Continue monitoring if needed
sleep 10 && tmux capture-pane -t %33 -p | tail -20# Send build command
tmux send-keys -t %33 "devcontainer build --workspace-folder /path/to/project" Enter
# Monitor build progress (check every 10-15 seconds)
sleep 10 && tmux capture-pane -t %33 -p | tail -25
# Verify completion
tmux capture-pane -t %33 -p | tail -30# Start multiple tasks in different panes (sleep 1 between each)
tmux send-keys -t %33 "task1" Enter
sleep 1
tmux send-keys -t %34 "task2" Enter
sleep 1
tmux send-keys -t %35 "task3" Enter
# Check all panes
tmux capture-pane -t %33 -p | tail -10
tmux capture-pane -t %34 -p | tail -10
tmux capture-pane -t %35 -p | tail -10sudoload-bufferpaste-buffer# Step 1: Write command to local file (Write tool or echo)
# /tmp/tmux-send.txt contains: sudo journalctl -u nix-daemon.service
# Step 2: Load into tmux buffer and paste to target pane
tmux load-buffer /tmp/tmux-send.txt
tmux paste-buffer -t %N
tmux send-keys -t %N Enter
# Step 3: Wait and capture output
sleep 3 && tmux capture-pane -t %N -p -S -20load-bufferpaste-buffersleep 1sleeptail -Ntmux capture-pane -t %N -p# List all panes with IDs
tmux list-panes -a
# Get current pane ID
tmux display-message -p '#{pane_id}'