Open Serpentian opened 5 months ago
This app looks very interesting. If you add preview, how about reusing scope.sh that ranger uses.
Image preview can use similar protocols utilised by Yazi.
Image preview: https://github.com/yorukot/Termage Create a golang package for previewing files. Contributions are welcome
Platform | Protocol | Status |
---|---|---|
kitty | Kitty unicode placeholders | ❌ |
Konsole | Kitty old protocol | ❌ |
iTerm2 | Inline images protocol | ❌ |
WezTerm | Inline images protocol | ❌ |
Mintty (Git Bash) | Inline images protocol | ❌ |
foot | Sixel graphics format | ❌ |
Ghostty | Kitty old protocol | ❌ |
Black Box | Sixel graphics format | ❌ |
VSCode | Inline images protocol | ❌ |
Tabby | Inline images protocol | ❌ |
Hyper | Inline images protocol | ❌ |
https://github.com/yorukot/superfile/assets/107802416/68702cc0-e8ac-41e6-89b3-df6c67d3655f
A quick update. The text file preview is now complete. I was actually going to start with the image preview, but it's a bit hard... So I may need more time, or if anyone has experience writing image previews feel free to contribute!
why not just invoke chafa or viu and pass it dimensions to use.
why not just invoke chafa or viu and pass it dimensions to use.
As far as I know, it's not that simple. :(
I know that both ranger and vifm do image preview with chafa. you could look at their code to see how they do it.
Ctpv is good for that we can use it and it's fast as it's written in C
@yorukot can we integrate c or c++ tools for image preview? we can use ueberzugpp, it is a continuation of ueberzug and is in c++ as it's pretty fast. also why are we making a custom file previewer?
For now, I can definitely accept the use of third-party software, but even so, I still don't know how to do it...
@yorukot i have an idea. maybe we can use image previewing as a plugin for superfile. In the plugin we can put ueberzugpp to be a dependency that has to be either manually installed by the user or we will install by ourselves. then the image preview can use ueberzugpp by running the command. like exec.cmd or something like that
Image preview: https://github.com/yorukot/Termage Create a golang package for previewing files. Contributions are welcome Platform Protocol Status kitty Kitty unicode placeholders ❌ Konsole Kitty old protocol ❌ iTerm2 Inline images protocol ❌ WezTerm Inline images protocol ❌ Mintty (Git Bash) Inline images protocol ❌ foot Sixel graphics format ❌ Ghostty Kitty old protocol ❌ Black Box Sixel graphics format ❌ VSCode Inline images protocol ❌ Tabby Inline images protocol ❌ Hyper Inline images protocol ❌
Pixel, which is written in Go. You may be able to integrate it. https://github.com/sachinsenal0x64/pixel
hmm, it looks good. I think we can integrate it considering that we can customize the size and position of the image to be rendered. let's see to yorukot
It'd be great, if superfile could preview files, like ranger does. At least text files