detached a87ac1a

docs(demo): cut the window out of the gif with real transparency

vhs cannot emit a transparent margin, so make demo now masks
everything outside the rounded window rect via imagemagick before
gifsicle. Also force --no-conserve-memory: the huge-GIF fallback
roughly doubles the optimized size.
commit
a87ac1a82071261946a05ccfa8bc962b5d32548e
author
brice · · 2026-07-24 17:32 UTC
parent
2ec25e2
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
3 files · +16 -3
M Makefile +15 -2
@@ -28,8 +28,21 @@ mocks:
2828 demo:
2929 docker build -f scripts/demo/Dockerfile -t vev-demo .
3030 ./scripts/demo/run.sh demo.tape
31+ # vhs cannot emit a transparent margin, so cut the window out after the
32+ # fact: everything outside the rounded window rect becomes GIF
33+ # transparency. The geometry mirrors demo.tape (1200x750 canvas, margin
34+ # 20, border radius 10); keep them in sync.
35+ docker run --rm --entrypoint magick -v "$(CURDIR)/scripts/demo/out:/out" vev-demo \
36+ -size 1200x750 xc:black -fill white \
37+ -draw "roundrectangle 20,20 1179,729 10,10" /out/mask.png
38+ docker run --rm --entrypoint magick -v "$(CURDIR)/scripts/demo/out:/out" vev-demo \
39+ -limit memory 8GiB -limit map 12GiB /out/demo.gif -coalesce \
40+ null: \( /out/mask.png -alpha off \) -compose CopyOpacity \
41+ -layers composite /out/demo-masked.gif
3142 # --lossy above 30 smears the near-identical darks of the window chrome
32- # (margin fill, window bar, terminal background) into visible banding.
33- docker run --rm --entrypoint gifsicle -v "$(CURDIR)/scripts/demo/out:/out" vev-demo -O3 --lossy=30 -o /out/demo.gif /out/demo.gif
43+ # (window bar vs terminal background) into visible banding, and the
44+ # conserve-memory fallback for huge inputs roughly doubles the output.
45+ docker run --rm --entrypoint gifsicle -v "$(CURDIR)/scripts/demo/out:/out" vev-demo --no-conserve-memory -O3 --lossy=30 -o /out/demo.gif /out/demo-masked.gif
46+ rm scripts/demo/out/demo-masked.gif scripts/demo/out/mask.png
3447 mkdir -p docs/assets
3548 cp scripts/demo/out/demo.gif docs/assets/demo.gif
@@ -28,8 +28,21 @@ mocks:
28 demo:28 demo:
29 docker build -f scripts/demo/Dockerfile -t vev-demo .29 docker build -f scripts/demo/Dockerfile -t vev-demo .
30 ./scripts/demo/run.sh demo.tape30 ./scripts/demo/run.sh demo.tape
31+ # vhs cannot emit a transparent margin, so cut the window out after the
32+ # fact: everything outside the rounded window rect becomes GIF
33+ # transparency. The geometry mirrors demo.tape (1200x750 canvas, margin
34+ # 20, border radius 10); keep them in sync.
35+ docker run --rm --entrypoint magick -v "$(CURDIR)/scripts/demo/out:/out" vev-demo \
36+ -size 1200x750 xc:black -fill white \
37+ -draw "roundrectangle 20,20 1179,729 10,10" /out/mask.png
38+ docker run --rm --entrypoint magick -v "$(CURDIR)/scripts/demo/out:/out" vev-demo \
39+ -limit memory 8GiB -limit map 12GiB /out/demo.gif -coalesce \
40+ null: \( /out/mask.png -alpha off \) -compose CopyOpacity \
41+ -layers composite /out/demo-masked.gif
31 # --lossy above 30 smears the near-identical darks of the window chrome42 # --lossy above 30 smears the near-identical darks of the window chrome
32- # (margin fill, window bar, terminal background) into visible banding.43+ # (window bar vs terminal background) into visible banding, and the
33- docker run --rm --entrypoint gifsicle -v "$(CURDIR)/scripts/demo/out:/out" vev-demo -O3 --lossy=30 -o /out/demo.gif /out/demo.gif44+ # conserve-memory fallback for huge inputs roughly doubles the output.
45+ docker run --rm --entrypoint gifsicle -v "$(CURDIR)/scripts/demo/out:/out" vev-demo --no-conserve-memory -O3 --lossy=30 -o /out/demo.gif /out/demo-masked.gif
46+ rm scripts/demo/out/demo-masked.gif scripts/demo/out/mask.png
34 mkdir -p docs/assets47 mkdir -p docs/assets
35 cp scripts/demo/out/demo.gif docs/assets/demo.gif48 cp scripts/demo/out/demo.gif docs/assets/demo.gif
M docs/assets/demo.gif +0 -0 binary file: no text diff

binary file: no text diff

M scripts/demo/Dockerfile +1 -1
@@ -14,7 +14,7 @@ RUN pacman -Sy --noconfirm archlinux-keyring \
1414 && sed -i '/^NoExtract.*usr\/share\/man/d' /etc/pacman.conf \
1515 && pacman -Syu --noconfirm \
1616 vhs ttyd ffmpeg chromium \
17- btop fastfetch gifsicle \
17+ btop fastfetch gifsicle imagemagick \
1818 eza neovim man-db man-pages coreutils \
1919 nodejs npm ncurses \
2020 ttf-jetbrains-mono-nerd \
@@ -14,7 +14,7 @@ RUN pacman -Sy --noconfirm archlinux-keyring \
14 && sed -i '/^NoExtract.*usr\/share\/man/d' /etc/pacman.conf \14 && sed -i '/^NoExtract.*usr\/share\/man/d' /etc/pacman.conf \
15 && pacman -Syu --noconfirm \15 && pacman -Syu --noconfirm \
16 vhs ttyd ffmpeg chromium \16 vhs ttyd ffmpeg chromium \
17- btop fastfetch gifsicle \17+ btop fastfetch gifsicle imagemagick \
18 eza neovim man-db man-pages coreutils \18 eza neovim man-db man-pages coreutils \
19 nodejs npm ncurses \19 nodejs npm ncurses \
20 ttf-jetbrains-mono-nerd \20 ttf-jetbrains-mono-nerd \

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 12

Tags 11

↑↓ moveenter openesc close