mfontanini / presenterm

A markdown terminal slideshow tool
https://mfontanini.github.io/presenterm/
BSD 2-Clause "Simplified" License
1.19k stars 29 forks source link

Use custom image writers for kitty/iterm #157

Closed mfontanini closed 8 months ago

mfontanini commented 8 months ago

This introduces custom code to write images when using the kitty or iterm protocols. viuer is still used for ascii blocks and sixel, but it would be nice to get rid of that dependency at some point. The initial motivation for this PR was to fix #153: the PR I made on viuer (https://github.com/atanunq/viuer/pull/53) has not shown any movement and the project is generally quite dead, I decided to implement this here instead. #153 is still open but with the ground work done on this PR it should be pretty easily fixable.

The new features/improvements this PR adds are:

Not that it really matters but the memory usage when running the demo presentation under kitty went down from ~15mb to ~14mb and the CPU usage when switching back and forth between the 2 slides in that presentation that contain an image went from ~3% to ~0.3%.