Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: file preview #26

Open
Serpentian opened this issue Apr 9, 2024 · 11 comments
Open

feature: file preview #26

Serpentian opened this issue Apr 9, 2024 · 11 comments
Labels
idea any new ideas or suggestions

Comments

@Serpentian
Copy link

It'd be great, if superfile could preview files, like ranger does. At least text files

@yorukot yorukot added enhancement New feature or request idea any new ideas or suggestions and removed enhancement New feature or request labels Apr 9, 2024
@pcause
Copy link

pcause commented May 11, 2024

This app looks very interesting. If you add preview, how about reusing scope.sh that ranger uses.

@vsedov
Copy link

vsedov commented May 12, 2024

Image preview can use similar protocols utilised by Yazi.

@yorukot
Copy link
Owner

yorukot commented May 12, 2024

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

@yorukot
Copy link
Owner

yorukot commented May 19, 2024

Screencast.from.2024-05-19.18-06-10.mp4

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!

@pcause
Copy link

pcause commented May 19, 2024

why not just invoke chafa or viu and pass it dimensions to use.

@yorukot
Copy link
Owner

yorukot commented May 20, 2024

why not just invoke chafa or viu and pass it dimensions to use.

As far as I know, it's not that simple. :(

@pcause
Copy link

pcause commented May 20, 2024

I know that both ranger and vifm do image preview with chafa. you could look at their code to see how they do it.

@dr3mro
Copy link

dr3mro commented May 22, 2024

Ctpv is good for that we can use it and it's fast as it's written in C

@AnshumanNeon
Copy link
Contributor

@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?

@yorukot
Copy link
Owner

yorukot commented Jun 28, 2024

For now, I can definitely accept the use of third-party software, but even so, I still don't know how to do it...

@AnshumanNeon
Copy link
Contributor

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea any new ideas or suggestions
Projects
Status: In Progress
Development

No branches or pull requests

6 participants