Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Commit 23719fa

Browse files
committed
Update screenshot
Use a bunch of scripts and a small custom wezterm config to automate the screenshot as much as possible. If only Gnome would let me take a screenshot of a window from command line.
1 parent adbccca commit 23719fa

File tree

8 files changed

+58
-4
lines changed

8 files changed

+58
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ $ mdcat sample.md
88

99
![mdcat showcase with different colour themes][sxs]
1010

11-
mdcat in [kitty], with Tango Light, [Solarized] Light, and [Dracula] (from left to
12-
right), and [PragmataPro] as font.
11+
mdcat in [WezTerm], with "One Light (base16)", "Gruvbox Light", and "Darcula
12+
(base16)" (from left to right), and [JetBrains Mono] as font.
1313

1414
[CommonMark]: http://commonmark.org
1515
[Solarized]: http://ethanschoonover.com/solarized
1616
[dracula]: https://draculatheme.com/iterm/
17-
[kitty]: https://sw.kovidgoyal.net/kitty/index.html
18-
[PragmataPro]: https://www.fsd.it/shop/fonts/pragmatapro/
17+
[wezterm]: https://wezfurlong.org/wezterm/
18+
[JetBrains Mono]: https://www.jetbrains.com/lp/mono/
1919
[sxs]: ./screenshots/side-by-side.png
2020

2121
## Features

screenshots/dracula.png

-33.9 KB
Binary file not shown.

screenshots/side-by-side.png

131 KB
Loading

screenshots/solarized-light.png

-34.6 KB
Binary file not shown.

screenshots/tango-light.png

-35.2 KB
Binary file not shown.

screenshots/wezterm.lua

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
-- Minimal wezterm configuration for our screenshots
2+
local wezterm = require("wezterm")
3+
4+
return {
5+
default_prog = {
6+
"bash",
7+
"--norc",
8+
"-c",
9+
"mdcat --columns 50 ./sample/showcase.md",
10+
},
11+
term = "wezterm",
12+
font = wezterm.font("JetBrains Mono"),
13+
initial_cols = 60,
14+
-- We need 40 rows for the wrapped showcase document
15+
initial_rows = 40,
16+
exit_behavior = "Hold",
17+
}

scripts/combine-screenshots

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
# Copyright 2020 Sebastian Wiesnser <[email protected]>
3+
4+
# This Source Code Form is subject to the terms of the Mozilla Public
5+
# License, v. 2.0. If a copy of the MPL was not distributed with this
6+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+
8+
set -euo pipefail
9+
10+
DEST="$(git rev-parse --show-toplevel)/screenshots/side-by-side.png"
11+
12+
montage "$@" -tile "$#x1" -geometry +0+0 "$DEST"
13+
oxipng "$DEST"

scripts/screenshot-windows

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
# Copyright 2020 Sebastian Wiesnser <[email protected]>
3+
4+
# This Source Code Form is subject to the terms of the Mozilla Public
5+
# License, v. 2.0. If a copy of the MPL was not distributed with this
6+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+
8+
set -euo pipefail
9+
10+
cd "$(git rev-parse --show-toplevel)"
11+
12+
COLOR_THEMES=(
13+
'One Light (base16)'
14+
'Gruvbox Light'
15+
'Darcula (base16)'
16+
)
17+
SAMPLE="./sample/showcase.md"
18+
LINES="$(wc -l "${SAMPLE}" | cut -d' ' -f1)"
19+
20+
for theme in "${COLOR_THEMES[@]}"; do
21+
wezterm --config-file ./screenshots/wezterm.lua \
22+
--config "color_scheme='$theme'" \
23+
start --cwd .
24+
done

0 commit comments

Comments
 (0)