a789495a98
CI / Quality Guardrails (push) Waiting to run
CI / Build & Test (macos-latest) (push) Waiting to run
CI / Build & Test (ubuntu-latest) (push) Waiting to run
CI / Build & Test (windows-latest) (push) Waiting to run
CI / Format (push) Waiting to run
CI / PowerShell Syntax (push) Waiting to run
CI / Windows Cross-Target Check (Linux) (push) Waiting to run
FreeBSD Smoke / FreeBSD Smoke (x86_64) (push) Has been cancelled
36 lines
925 B
Bash
Executable File
36 lines
925 B
Bash
Executable File
#!/bin/bash
|
|
# Capture jcode screenshots with your actual terminal theme
|
|
# Usage: ./capture_screenshot.sh [output_name]
|
|
|
|
set -e
|
|
|
|
OUTPUT_DIR="$(dirname "$0")/../docs/screenshots"
|
|
OUTPUT_NAME="${1:-jcode-screenshot}"
|
|
OUTPUT_PATH="$OUTPUT_DIR/${OUTPUT_NAME}.png"
|
|
|
|
mkdir -p "$OUTPUT_DIR"
|
|
|
|
echo "📸 jcode Screenshot Capture"
|
|
echo ""
|
|
echo "Instructions:"
|
|
echo " 1. Make sure jcode is running in a visible terminal"
|
|
echo " 2. Set up the UI state you want to capture"
|
|
echo " 3. Press Enter here, then click on the jcode window"
|
|
echo ""
|
|
read -p "Press Enter when ready..."
|
|
|
|
# Use slurp to let user select a window/region, then capture with grim
|
|
GEOMETRY=$(slurp)
|
|
if [ -n "$GEOMETRY" ]; then
|
|
grim -g "$GEOMETRY" "$OUTPUT_PATH"
|
|
echo "✅ Saved to: $OUTPUT_PATH"
|
|
|
|
# Show the image dimensions
|
|
if command -v file &>/dev/null; then
|
|
file "$OUTPUT_PATH"
|
|
fi
|
|
else
|
|
echo "❌ No region selected"
|
|
exit 1
|
|
fi
|