Comments (21)
from joshuto.
ueberzugpp is intended as a drop in replacement for ueberzug. it should function identically for the moment. if all else fails you can just send it a command formatted to json
from joshuto.
Seems like ueberzug
utilizes x11 features to accomplish this.
I no longer directly use x11 and it is slowly being phased out, so I'm not too motivated on getting this feature implemented.
However, if anyone else wants to implement this without introducing dependencies on x11, feel free!
from joshuto.
Oh :( , almost most cli file managers I used did support ueberzug like clifm, lf, vifm etc! ueberzug depends on X yes , But Its the only image viewing protocol or such that works for every terminal unlike w3m , sixel etc , You can even play gifs with it I think , demo
I have a script which makes ueberzug work standalone , here
from joshuto.
Hi!
My 2 cents:
I guess an image preview feature will be wanted / needed / demanded by many users and it makes total sense to get it implemented. It's just super useful. On the other hand, I understand that avoiding certain dependencies (and X likely belongs to them) is necessary to keep the project slick, clean and flexible. Unfortunately, showing images in a terminal is something very special and will be hard to realize without some kind of dependency.
But I also guess that most users from the joshuto target audience will be fans of the “do one thing and do it well” idea and won't have a problem to integrate other programs with some configuration and scripting effort.
So, just a rough idea: What about some kind of script hook when selecting a file?
As soon as we have some textual file preview implemented, we could have a feature that can call a script (on_selection) with the preview field’s starting coordinate, total height, and the number of lines of the textual preview (all in terminal character cells). That would allow that external script to use Ueberzug or another solution like icat from Kitty to show an image. When the file selection changes, another hook-script (“on_deselection”) could be called in where the user could remove the image. Only when this 2nd script terminates, the first one (on_selection) is called again with the currently selected file. (I guess the latter must also be called when joshuto terminates and when tabs change. Also geometry changes must be considered somehow.)
People could do plenty of things with a hook-solution like this and joshuto could document some snippets to easily integrate image previews into joshuto. Joshuto itself wouldn't have any additional dependency or any bloat for this very special image-preview feature.
Any opinions?
from joshuto.
I dont think using only icat would be good since only kitty users would be able to use it and it'd limit all the non kitty users as well like alacritty , st etc . A file manager being terminal specific like working only for one terminal ( to show images) wouldnt be a good idea ig :/
from joshuto.
Hm, seems I expressed myself not very clearly. I was not talking about “only using icat” at all. (I'm not using Kitty myself.) I was talking about using external user-scripts to control a preview program which could be Ueberzug or icat or anything else which supports drawing an image on the terminal by getting the cell coordinates. I basically proposed to handle the image preview in separate user scripts to keep the dependencies out of joshuto and to gain flexibility for the users.
Was my text that confusing? English is not my native lang but I'm a bit surprised that it's that bad.... :|
from joshuto.
@DLFW no I did understand what you said! I just got a bit upset when I heard joshuto wouldnt be getting any ueberzug support. I like ranger and it has good image support but its a bit slow! thats why I tried joshuto and its fast but yeah ueberzug needs some support :D
from joshuto.
I've created a new issue to track the progress and discussion on getting file previews to work. #67
Unfortunately, I won't have much time to work on this :/
from joshuto.
I have provided #113 and some documentation how to implement image previes. If somebody can also test the documented recipe, in case this gets merged, that would be great. ;)
from joshuto.
@kamiyaa I tried the scripts and it didnt work for me :(
from joshuto.
from joshuto.
i had those 2 scripts in my joshuto config's dir and ran this wrapper https://github.com/kamiyaa/joshuto/blob/main/docs/image_previews.md#joshuto-wrapper
from joshuto.
The problem is not with the hook scripts or the wrapper, but with the basic file preview.
Your screenshot shows that there is not preview area, ergo the preview-shown hook has not been invoked.
You need to configure a preview script, for example preview_script = "~/.config/joshuto/preview.sh"
. It's not necessary to have this script printing anything to stdout, but it will cause Joshuto to show the preview area. That will trigger the hook script which now has some place to draw its picture on.
from joshuto.
works now! thanks @DLFW
from joshuto.
but memory usage of ueberzug is way tooo high
from joshuto.
Hi,
I compared the mem usage with the Joshuto wrapper and with Ranger and cannot see a difference. Ueberzug's mem usage jumps around (it's garbage collected) but behaves similar in both.
Ueberzug itself is of course out of scope here. If there is no mistake in the wrapper logic, I cannot see what we can do about that.
from joshuto.
Hi, I compared the mem usage with the Joshuto wrapper and with Ranger and cannot see a difference. Ueberzug's mem usage jumps around (it's garbage collected) but behaves similar in both.
Ueberzug itself is of course out of scope here. If there is no mistake in the wrapper logic, I cannot see what we can do about that.
yea i tested it with ranger and viewing multiple images with ueberzug sequentially increments its memory size
from joshuto.
https://github.com/Adit-Chauhan/Ueberzug-rs
https://pkg.go.dev/gitlab.com/diamondburned/ueberzug-go
from joshuto.
so seebye/ueberzug got archived.
good news, ueberzugpp has a wayland output method that works with sway, which could mean that wlroots is supported. this might be worth testing further integration
from joshuto.
Thanks @Beethoven-n for spreading awareness! Interesting... If ueberzugpp
could act as a single abstraction bin to serve all terminals and X11+Wayland, I also think that it could make sense to think about a “hard” integration for a better out-of-the-box experience for Joshuto users.
However, I had some problems to get Überzug++ running reliably and I saw you also had some confusion. If Überzug++ provides no good out-of-the-box experience, Joshuto won't either, when we integrate it.
I just have merge-requested a doc-update for using Überzug++ with Joshuto's hook scripts (#359). I would propose to first check for some time how this project develops and if we stumble across some more user opinions. Maybe some Wayland&Non-Kitty-Users are around to check what out-of-the-box-happiness they experience with Überzug++?
from joshuto.
Related Issues (20)
- Failed to parse keymap.toml HOT 4
- Track File Path History in Joshuto and Update Zoxide Database HOT 1
- Proposal: Perform a new patch release HOT 3
- macOS: Any `/Users/<username>` is replaced with `~`, while this can be wrong HOT 2
- Characters is not displayed normally HOT 1
- Problem with the file chooser argument HOT 7
- why I can't bind ctrl-j to other command, the ctrl-j can only be {open: } HOT 4
- There will always be blue arrows in the left frame. HOT 9
- Display text when file exceeds max preview size
- Please add cargo-binstall support
- Issue with copying filenames HOT 2
- How to change color for icons? HOT 1
- quit --output-current-directory cannot be used normally HOT 1
- Add "--config" flag as a CLI argument HOT 2
- Environment variable not found HOT 4
- RFE: adjustments for borders HOT 2
- Überzug++ fails to preview images
- Add a new command to print default configuration
- No image preview on Alacritty in Void Herbstluft HOT 6
- open command does not respect mimetype.toml HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from joshuto.