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

Execute windows rules before creating wayland windows #207

Open
HenningCode opened this issue Jul 17, 2024 · 27 comments
Open

Execute windows rules before creating wayland windows #207

HenningCode opened this issue Jul 17, 2024 · 27 comments
Labels
enhancement New feature or request

Comments

@HenningCode
Copy link

Hello,

sorry if this is already answered anywhere, but I cloud not find anything.
I am using Alacritty with Überzeug++ to preview images and it works flawlessly, but the images are "flying in" as some sort of animation. How can I turn this animation off?

Greetings

@jstkdng
Copy link
Owner

jstkdng commented Jul 17, 2024

Are you perhaps using wayland?

@HenningCode
Copy link
Author

@jstkdng yeah I am on hyprland with wayland.

@jstkdng
Copy link
Owner

jstkdng commented Jul 18, 2024

i knew it, those "animations" aren't really animations. U++ just creates wayland windows with an image and then moves them by using the wm's rules. Only way to fix that would be to first create the rules and then the windows but that'd need some more complex changes.

@jstkdng jstkdng changed the title How to turn off image animations Execute windows rules before creating wayland windows Jul 18, 2024
@jstkdng jstkdng added the enhancement New feature or request label Jul 18, 2024
@BEST8OY
Copy link

BEST8OY commented Jul 19, 2024

@HenningCode
This rule somehow alleviate it but the flying is still there.

windowrulev2 = noanim, title:ueberzugpp

@thatDudo
Copy link
Contributor

thatDudo commented Sep 12, 2024

Maybe we could create the window one time and then make the window update its shown image. And make it invisible if nothing is shown.

@HenningCode
Copy link
Author

HenningCode commented Dec 30, 2024

@HenningCode This rule somehow alleviate it but the flying is still there.

windowrulev2 = noanim, title:ueberzugpp

Sorry for the late replay. This kind of works, but the images are sometimes rendered in the middle of the screen first. So I think this but is still present?

@HenningCode
Copy link
Author

HenningCode commented Dec 31, 2024

@jstkdng
Another problem is that the created ueberzug windows are not moved accordingly if a pdf is opened.
This example pdf was opened with yazi. The pdf preview is still present ontop of the pdf.
image

@jstkdng
Copy link
Owner

jstkdng commented Feb 4, 2025

sorry for the late response, this has been implemented in https://github.com/jstkdng/ueberzugpp-new, do give it a try and provide feedback if you can

@HenningCode that is expected as previews are just child windows

@HenningCode
Copy link
Author

@jstkdng

Hi,
I just wanted to try it, but could not get it running. I am using NixOS and pulling from source and building did not work because I could not manage to get the third_party libs running. CMake states that it cant find the cmaelists.txt of glaze, cli11 and spdlog.

I saw in this repos cmakelists that its possible to use the library as system library.
https://github.com/jstkdng/ueberzugpp/blob/master/CMakeLists.txt#L58

Would this be possible for ueberzugpp-new as well? I think than it would be possible for me to build it on nixos and tests it.

@jstkdng
Copy link
Owner

jstkdng commented Feb 5, 2025

sure, run cmake with the option -DUSE_BUNDLED_LIBRARIES=OFF and cmake will try to find the system libraries, or git clone the submodules

@BEST8OY
Copy link

BEST8OY commented Feb 6, 2025

It's a huge improvement over current version in Wayland
It's so fast that I didn't know it could actually be this fast
And it draws the windows perfectly

1.mp4

The only problem I faced is

2.mp4

@jstkdng
Copy link
Owner

jstkdng commented Feb 6, 2025

It's so fast that I didn't know it could actually be this fast

it is indeed fast, and I believe it can be faster

The only problem I faced is

yeah, the current solution is not robust enough and covers the simplest cases

@HenningCode
Copy link
Author

@jstkdng Thanks a lot. Got it compiling, but it does not work for me with Alacritty+yazi. Yazi is recognizing ueberzugpp 0.0.1 so I guess its the right version, but not pictures or pdfs are getting shown.

@HenningCode
Copy link
Author

@jstkdng I did some more testing and found that very few images are working. So ueberzugpp_new is doing something, but a lot of pictures are not working and pdf are not working at all.

@jstkdng
Copy link
Owner

jstkdng commented Feb 8, 2025

hm, that is weird, it should work fine unless yazi is doing something else on its side. I'll try to test yazi and see what's going on.

@jstkdng
Copy link
Owner

jstkdng commented Feb 10, 2025

@HenningCode I think it should be fixed now on master, please do test. Also, noticed yazi resizes the images before sending them to upp, you might want to disable that since your pc would be doing double work.

@jstkdng
Copy link
Owner

jstkdng commented Feb 10, 2025

@BEST8OY that issue should also be fixed now, upp-new now responds to terminal size/position changes

@HenningCode
Copy link
Author

@jstkdng Some more pictures are loading, still not all. Also pdfs are not working at all.

@jstkdng
Copy link
Owner

jstkdng commented Feb 12, 2025

@HenningCode are you using the latest commit? pdfs work on my machine ™️

Image

@HenningCode
Copy link
Author

Yes I am. Just tested with commit 98d26e0e278fc0137d385e9666b2a13024946401.

For me its not working..

Image

Can I somehow better debug why this could not be working?

@jstkdng
Copy link
Owner

jstkdng commented Feb 13, 2025

Can I somehow better debug why this could not be working?

sure, run export SPDLOG_LEVEL=trace, try to show pdfs, and then post the log at /tmp/ueberzugpp-$USER.log

@HenningCode
Copy link
Author

ueberzugpp-henning.log

Okay this is a log. I selected images that work and pdfs and images that dont work. The ones working dont have these log messages

[2025-02-13 13:50:41.482674122] [I] [vips] resizing image 8de3aa838465b8d4ba58c9358f4c3b97 to 440x236 and caching
[2025-02-13 13:50:41.799619189] [I] [application] starting

@jstkdng
Copy link
Owner

jstkdng commented Feb 13, 2025

Hmmm, only INFO messages are being logged, seems SPDLOG_LEVEL is not reaching upp. Can you test on other file managers?

@HenningCode
Copy link
Author

@jstkdng I just tested it with ranger now. Pictures are all getting shown now, but PDFs still no good. Also when using ranger no logs were created. I dont really know why...

And I found another bug while in tmux. Pictures not not getting drawn in the right place.

Image

@jstkdng
Copy link
Owner

jstkdng commented Feb 14, 2025

I just tested it with ranger now

pdfs don't show with ranger afaik

And I found another bug while in tmux. Pictures not not getting drawn in the right place.

tmux is not yet implemented

when using ranger no logs were created

maybe ranger is overriding TMP_DIR or something under nixos

@HenningCode
Copy link
Author

Okay I just checked it with my Arch install I still had. There it works fine with yazi. Everything shows up. Seems to be an install issue from my side on nixos. Any ideas whentmux support will come?

@jstkdng
Copy link
Owner

jstkdng commented Feb 15, 2025

Seems to be an install issue from my side on nixos

weird that it only happens with nixos

Any ideas whentmux support will come?

probably after gif support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants