kyoheiu / felix

tui file manager with vim-like key mapping
https://kyoheiu.dev/felix/
MIT License
729 stars 26 forks source link

pdf & epub preview with Zathura on MacOS #148

Closed ulrikmonrad closed 1 year ago

ulrikmonrad commented 1 year ago

Hi,

I'm having trouble getting the file previewer to work with Zathura on macOS. I've set config.toml in both Application Support and .config as presented in the documentation, but when hovering over a pdf or epub file i get the (Binary File) message.

Having no issues using zathura from the terminal otherwise when opening pdf's or epub. Tried using the logging function to see if there was any reported errors but nothing shows up.

Am i missing something?

kyoheiu commented 1 year ago

I suppose you set [exec] in config.yaml. That means, when you open a pdf or epub by pressing l / Right / Enter, zathura opens it; the preview feature is another thing. Currently only text, image or directory can be previewed.

kyoheiu commented 1 year ago

On the preview feature, it seems possible to e.g. convert pdf to image and show the image preview in the preview space (your terminal needs to support hi-res graphics though), but it will need to use https://github.com/mbr/poppler-rs, which is GPL-licensed (due to libpoppler), while this app MIT, so no, it won't do that.