mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-19 20:05:00 +00:00
18 lines
531 B
Bash
Executable file
18 lines
531 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Check if there is exactly one active window
|
|
WINDOW_COUNT=$(tmux list-windows | wc -l)
|
|
if [ "$WINDOW_COUNT" -ne 1 ]; then
|
|
echo "Error: Expected exactly 1 tmux window, found $WINDOW_COUNT windows."
|
|
exit 1
|
|
fi
|
|
|
|
# Get tmux window size (width x height)
|
|
TMUX_SIZE=$(tmux display -p '#{window_width}x#{window_height}')
|
|
|
|
# Print the terminal size
|
|
echo "Using terminal size: $TMUX_SIZE"
|
|
|
|
# Start asciinema recording with the tmux window size
|
|
asciinema rec -c "tmux attach -t 0 -r" --headless --tty-size $TMUX_SIZE $*
|
|
|