Files
VoelinClient/scripts/shots.sh
T
selikhovandClaude Opus 5.5 c4caeac168 voelin-ui: closer to the mockups in the details; steadier screenshots
The voice channel's buttons now sit beside its title, so the topic and
the count below use the whole width, as in the mockup. The stream card's
gradient has two stops: the software renderer drew a dotted seam at the
middle one. The resize handle is a grip of three dots.

Screenshots run with FFmpeg off (probing a hardware encoder crashed the
app now and then in this machine's AMF driver, which no picture needs),
on a screen twice the window's size so the pointer is not over the
window (it made a message show its hover actions), and take extra
arguments such as `--set ui.theme=light`. The development switches list
the new screens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 02:41:54 +03:00

32 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
# Take a screenshot of the app with sample data, headless.
#
# scripts/shots.sh <out.png> <VOELIN_OPEN> [<width>x<height>]
#
# The pictures in docs/screenshots/ are made this way (and reduced to 256
# colours with `convert -colors 256 PNG8:`).
#
# WAYLAND_DISPLAY is removed so the window opens on the Xvfb server and not
# on the desktop of a Wayland session (winit prefers Wayland when it can).
# The screen is twice the window's size, so the pointer (in its middle) is
# not over the window and nothing shows as hovered. FFmpeg stays off: the
# pictures need no hardware encoders, and probing them can crash in some
# drivers. Extra arguments (`--set ui.theme=light`) come from $ARGS.
set -eu
out=$1
open=$2
size=${3:-1440x960}
w=${size%x*}
h=${size#*x}
bin=${VOELIN_BIN:-$CARGO_TARGET_DIR/debug/voelin}
env -u WAYLAND_DISPLAY \
SLINT_BACKEND=winit-software \
VOELIN_FFMPEG=0 \
VOELIN_DATA_DIR="$(mktemp -d)" \
VOELIN_DEMO_UI=1 \
VOELIN_OPEN="$open" \
VOELIN_WINDOW_SIZE="$size" \
VOELIN_SCREENSHOT="$out" \
VOELIN_SCREENSHOT_DELAY="${DELAY:-4}" \
xvfb-run -a -s "-screen 0 $((w * 2))x$((h * 2))x24" "$bin" ${ARGS:-} >/dev/null 2>&1