termpdf
termpdf copied to clipboard
barebones graphical pdf/djvu/cbr/image viewer that works inside iTerm2 2.9+ and Kitty
This might be an unsupported setup. I'm using Tabby on windows with wsl2 running ubuntu. I get the following
The README says > As mentioned above, if you opened several documents at once, you can cycle through these documents by pressing `b`. For me, it requires hitting b twice...
Renders fine outside of tmux, but both image (jpg) and pdfs fail to render (after measuring has successfully occured). Example below is for the start of a pdf file: ...
I was a bit surprised to see that the script uses ghostscript _and_ poppler _and_ imagemagick. I would have thought that the first two provide more or less feature-complete tools...
The code should be checked with [shellcheck](https://www.shellcheck.net/) and fixed accordingly. It raises several warnings. I'd do it if gets merged.
Clear image before drawing new one to prevent pages of different sizes being drawn over each other
Screenshot of the problem below:  Note that this does introduce a moment where there is no image and so the screen flashes black.
This line: https://github.com/dsanson/termpdf/blob/5d9e9796d618dbe81bace9ffeb65f409cb461cb4/termpdf#L362 Crashes with: ``` sed: -e expression #1, char 1: unknown command: `.' ``` I'm guessing instead of `-i '.bak'` it should be `-i.bak`.
This line fails when the folder `~/.config/termpdf` doesn't exist. https://github.com/dsanson/termpdf/blob/5d9e9796d618dbe81bace9ffeb65f409cb461cb4/termpdf#L295 However, `~/.config` in general is not a good place for storing cache, please store it in `~/.cache/termpdf`.
If I force iTerm with `-iterm` everything works fine, but the only thing kitty displays is a bunch of A's (and then some other random letters): ``` AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA......