Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

195.3. chafa-1.18.3

Images as terminal graphics: sixel, kitty, iTerm2 or Unicode

1.18.3-1 · LGPL-3.0-or-later AND GPL-3.0-or-later · 1.1 SBU · 2.1 MiB, 58 files · 42_graphics, 132 of 189 · ports/core/image-libs/chafa

Homepage: https://hpjansson.org/chafa/

Why it is in KDOS. The comment above it in script/phases/42_graphics/packages.d/image-libs.txt:

THE OTHER HALF OF THE PICTURE PATH. Konsole decodes sixel, kitty and iTerm2 pictures and few programs in the tree emit one, so an image in a terminal is a filename without this or timg. chafa converts anything to whichever of those the terminal admits to. A photograph in a message is drawn by the same program that draws one in a file manager.

Depends on: glib, freetype2, libjpeg-turbo, librsvg, libtiff, libwebp, libheif, libavif, libjxl.

Required by (3): aerc, fastfetch, yazi.

Sources: chafa-1.18.3.tar.xz (1.0 MiB). Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/42_graphics/phase.env && kpkg install chafa'

build.sh:

./configure \
	--prefix=/usr \
	--libdir=/usr/lib \
	--mandir=/usr/share/man \
	--disable-static \
	--disable-man \
	--disable-gtk-doc \
	--with-jpeg \
	--with-svg \
	--with-tiff \
	--with-webp \
	--with-heif \
	--with-avif \
	--with-jxl
make
make DESTDIR=$PKG install
install -Dm644 docs/chafa.1 -t "$PKG/usr/share/man/man1"

Programs: chafa.

Libraries: libchafa.so.

Directories: /usr/include/chafa, /usr/lib/chafa, /usr/share/gtk-doc/html/chafa, /usr/share/licenses/chafa.