-
-
Notifications
You must be signed in to change notification settings - Fork 238
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
Preview transformers #898
Preview transformers #898
Conversation
BTW, I'd welcome suggestion of transformers for the website (and my own usage) |
-> we use the source file when the transformation failed
@eddiehazel The image is blurry here because your terminal doesn't support the Kitty protocol which broot uses to display high-res images. |
thanks, looking into it!
working well 💫 |
IMO wrapping should be done by broot so that the line numbers stay consistent (usually you want to jump to the right place when opening the file), but that's an interesting first step before I implement wrapping in broot. |
for sure, just playing around and it works for now ( : so i need to switch terminal to get kitty support because everyone has their own protocol 😭 i thought to make a transformer for this with i will take a look at some alternatives |
This can't really be a transformer. The protocol of iterm2 could probably be implemented in broot the same way I implemented the kitty protocol but I can't do it myself as I don't own a Mac. |
seems there is a lot of inspiration here: https://github.com/lusingander/iterm2img not sure if it's quite within my wheelhouse but i'll try size it up - wdyt? definitely up for testing either way! 🤲 btw https://wezfurlong.org/wezterm/imgcat.html seems xplatform + iterm img protocol and it's rust 🦀 👀 |
Even if you don't manage to finish, clarifying the problems and possible solutions would both be enlightening and useful, so you probably should. And you can come to miaou to discuss your findings. But we're going off the topic of this PR, so I suggest you create an issue for item2 support in broot (or for high-res image support on mac if you prefer it less specific). |
I personally don't particularly care about this feature but gave it a try on a mac anyways, @Canop I hope this helps.
Not sure if this is an issue of broot or any other part of my setup but pdfs and images for whatever reason don't fully utilize the space available for the preview panel. |
All images ? Or just the ones coming from pdf transformation ? |
You can increase the image width:
|
I could probably define some But this is one of those things which aren't always determined so I'm not sure it would be good. |
This allows defining file transformations that are applied to files before preview.
The default conf has 2 examples: previewing PDF and beautifying JSON:
PDF preview:
JSON beautification (the original file has no space nor new line):
Fix #494