Files
luma/Luma/scripts/capture-screenshots.sh
Ole André Vadla Ravnås f2ed003880 luma: Add macOS screenshot capture tool
Frida-based equivalent of the GTK capture tool. Navigates
the sidebar via NSAccessibility and captures each view with
CGWindowListCreateImage (in-process, no TCC needed). Produces
a per-view PNG gallery matching the GTK tool's output.
2026-04-09 23:14:09 +02:00

26 lines
476 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
OUTDIR="${1:-screenshots}"
APP="build/Luma.app"
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
if [ ! -d "$APP" ]; then
echo "Build the app first: make" >&2
exit 1
fi
open -a "$APP" --args --new-document
sleep 5
PID=$(pgrep -x Luma | head -1)
if [ -z "$PID" ]; then
echo "Luma not running" >&2
exit 1
fi
echo "Attached to Luma pid $PID" >&2
python3 "$SCRIPT_DIR/capture-screenshots.py" "$PID" "$OUTDIR"
kill "$PID" 2>/dev/null || true