artemsen / swayimg

Image viewer for Wayland
MIT License
379 stars 31 forks source link

Gallery not reloading properly when an image is deleted through a keybind and as a result the gallery thumbnails are blanking out too. #174

Closed charbelnicolas closed 3 months ago

charbelnicolas commented 3 months ago

Hi Artem, I have the following keybind set up for the gallery mode on my swayimgrc:

Delete = exec rm "%"; reload.

While the same keybind works perfectly fine on the viewer mode, when used in gallery mode, the following will happen:

ss_2024_08_04_21_14_24

Google drive video link:

https://drive.google.com/file/d/1ELz6W8jkbFE7tqSqV6Yyth-EvYAjEOKb/view?usp=sharing

I figured I'd ask for a few feature requests while I'm here...

It would be cool if perhaps we could have an option to remove/disable the selected image black border and the background shadow when in gallery mode, or at least make the shadow a bit softer?

I did notice that the shadow loads before the actual picture too when first entering gallery mode, maybe it would be nice to show the shadow only once the image has been loaded? Just a thought. As it is right now, it looks kind of glitchy because it shows an invisible square with a shadow while loading a big heavy image thumbnail.

I love the gallery mode by the way, very nice job, its really cool! Swayimg has become all I ever needed and wanted from an image viewer.

Thank you

artemsen commented 3 months ago

Fixed. I would recommend to use skip_file instead of reload. Its faster, because reload resets the cache and we need to reload all visible images. The action skip_file only removes the current file from the list.

It would be cool if perhaps we could have an option to remove/disable the selected image black border and the background shadow when in gallery mode, or at least make the shadow a bit softer?

No problem, I will do it.

As it is right now, it looks kind of glitchy because it shows an invisible square with a shadow while loading a big heavy image thumbnail.

I've tried not displaying unloaded images at all, but then navigation becomes awkward. I will think about this =)