1#!/bin/sh
2
3# EX: directory name, e.g. ex1
4EX="$1"
5
6{
7 cat <<EOF
8Require kak
9Set Shell "bash"
10Set FontSize 32
11Set Width 1200
12Set Height 600
13Output $EX.gif
14Hide
15Type@1ms "kak -n -e 'source %exp{%val{config}/colors/ashen.kak}; set-option global ashen_dynamic_cursor true; set-option global ashen_eol_cursor true; set-option global autoinfo normal; set-option -add global ui_options terminal_assistant=none; add-highlighter global/ wrap -word; add-highlighter global/ show-whitespaces -only-trailing; try autorestore-disable; set-option global modelinefmt %{%val{cursor_line}:%val{cursor_char_column} {{mode_info}}}' $EX/in" Enter
16Sleep 500ms
17Show
18EOF
19 cat "$EX/tape"
20 cat <<EOF
21Hide
22Type@1ms ":kill!" Enter
23Sleep 0.5s
24EOF
25} | vhs
26
27for f in "${EX}"/.in.kak.*; do
28 if [ -e "$f" ]; then rm "$f"; fi
29done