edluffy / hologram.nvim

👻 A cross platform terminal image viewer for Neovim. Extensible and fast, written in Lua and C. Works on macOS and Linux.
MIT License
1.26k stars 30 forks source link

ueberzug support #18

Open koalagang opened 1 year ago

koalagang commented 1 year ago

I understand from the README that hologram supports the Kitty Graphics Protocol and that there are plans to support the iTerm2 Images Protocol. Would you possibly consider adding support for ueberzug at some point in the future as well? It has no list of officially supported terminals and I have only personally tried it on Alacritty and st but I believe it should work just fine with most modern terminals running on Linux under X11. This would widen hologram's support to many more Linux terminals than just those which support the Kitty Graphics Protocol. There is actually another Neovim plugin - telescope-media-files.nvim - which utilises ueberzug by using a shell script but it does so within a Telescope buffer rather than in an editable buffer like hologram does. In addition, it supports previewing video thumbnails and documents (pdfs and epubs). The latter may be of special interest to you seeing as, under the Extensions section in the README, you mentioned plans for supporting previews of pdfs.

TornaxO7 commented 1 year ago

Sadly ueberzug is shut down now so I don't think that ueburzug support will come.

koalagang commented 1 year ago

Hi. Sorry for the late reply @TornaxO7. It is indeed ashame that it was shutdown but it seems to still be working so I think using it from the commit before the author removed the source code should be fine.

I've also archived the project on my own page and reverted it to the previous commit in case the author decides to completely remove the repo at some point.

jneidel commented 1 year ago

This would also allow for usage with tmux. Since even though I'm using kitty, I can't use this because icat does not work through tmux.

koalagang commented 1 year ago

I actually recently stumbled upon a spiritual successor to ueberzug by the name of ueberzugpp. It's written in C++ (rather than Python, which the original ueberzug was written in) and as far as I understood is considerably less buggy. Moreover, in addition to X11, it officially supports Sway and Hyprland (though I imagine it would probably work with most other wlroots compositors?). Either way, this would at least partially future-proof hologram's Linux support for the post-X11 era. Moreover, it works with tmux (which I suppose would fulfil your requirement @jneidel). It's designed to be a drop-in-replacement for ueberzug but also supports sixel, iterm2 and kitty. Anyone interested in working on support for this within hologram.nvim may also want to check out image.nvim -- another project with similar goals (it also just so happens to use a lot of hologram's code; see 'Thanks' subheading) which uses ueberzugpp.

N.B. I have not personally tested any of the software mentioned above. I've only learned of this through reading READMEs.

Should I change the issue title to 'ueberzugpp support'?