Coder Social home page Coder Social logo

Comments (21)

kamiyaa avatar kamiyaa commented on May 31, 2024 1

Closed via
#113
#115

from joshuto.

Beethoven-n avatar Beethoven-n commented on May 31, 2024 1

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.

kamiyaa avatar kamiyaa commented on May 31, 2024

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.

siduck avatar siduck commented on May 31, 2024

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

image

I have a script which makes ueberzug work standalone , here

image

from joshuto.

DLFW avatar DLFW commented on May 31, 2024

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.

siduck avatar siduck commented on May 31, 2024

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.

DLFW avatar DLFW commented on May 31, 2024

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.

siduck avatar siduck commented on May 31, 2024

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

kamiyaa avatar kamiyaa commented on May 31, 2024

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.

DLFW avatar DLFW commented on May 31, 2024

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.

siduck avatar siduck commented on May 31, 2024

@kamiyaa I tried the scripts and it didnt work for me :(

image

from joshuto.

siduck avatar siduck commented on May 31, 2024

image

from joshuto.

siduck avatar siduck commented on May 31, 2024

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.

DLFW avatar DLFW commented on May 31, 2024

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.

siduck avatar siduck commented on May 31, 2024

works now! thanks @DLFW

image

from joshuto.

siduck avatar siduck commented on May 31, 2024

but memory usage of ueberzug is way tooo high
image

from joshuto.

DLFW avatar DLFW commented on May 31, 2024

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.

siduck avatar siduck commented on May 31, 2024

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.

siduck avatar siduck commented on May 31, 2024

https://github.com/Adit-Chauhan/Ueberzug-rs
https://pkg.go.dev/gitlab.com/diamondburned/ueberzug-go

from joshuto.

Beethoven-n avatar Beethoven-n commented on May 31, 2024

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.

DLFW avatar DLFW commented on May 31, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.