shell icon indicating copy to clipboard operation
shell copied to clipboard

background: extensive animated image support

Open evencewang opened this issue 1 year ago • 3 comments

https://github.com/user-attachments/assets/6d5dfccb-be47-4f72-bcfc-2bb47c43a05b

Summary

  • Support for animated wallpapers along with caching support.
  • Wallpaper picker lazy-loads previews without blocking.
  • Preview viewport thumbnails could opt in / out of animation, defaulted to off.
  • Playback on / off support, currently pausing playback on lock, and resumes after unlock.
  • The related cli PR is here: https://github.com/caelestia-dots/cli/pull/68

Changes

  • cachingimagemanager.hpp + cachingimagemanager.cpp + CachingImage.qml reworked to show cached static frame 0 while animated frames decode.
    • Because of CachingImage.qml change, gifs are now also supported for .face (profile avatar). See video above when I lock my screen, I am using the same gif as the background, but they are unrelated, and you could use anything you would like for the profile avatar.
    • If we should guard against it being used for UI icons, let me know.
  • WallpaperList.qml addition to drive previews off immediately after index changes, scrolling to animated images will show a static preview right away.
  • modules/background/Wallpaper.qml + Background.qml populated with lock scope and gates playback pause/resume upon lock/unlock.

Testing

  • QT_LOGGING_TO_CONSOLE=1 quickshell -c caelestia when I had the logs to launch wallpaper picker, picking the animated wallpaper and set it, then watch the playback pause kick in while locked, and resumed after unlock.
  • Scrolling through the wallpaper selection viewport without selecting, landing on animated images will immediately kick off the preview (could use more testing).

Known issues:

  • Like static images, the caching of the thumbnail sometimes show an empty black rectangle, caching part should receive attention.

evencewang avatar Nov 07 '25 20:11 evencewang

@Gitkubikon Sorry! I had just seen that you had a PR open as well. :cry: I was working on this as a small extension for myself which is why I didn't check, and it blew out to be slightly more comprehensive than I thought it was going to be. Would love your feedback on this as well since you have worked on this, and potentially improving on this feature collaboratively.

evencewang avatar Nov 07 '25 21:11 evencewang

@Gitkubikon Sorry! I had just seen that you had a PR open as well. :cry: I was working on this as a small extension for myself which is why I didn't check, and it blew out to be slightly more comprehensive than I thought it was going to be. Would love your feedback on this as well since you have worked on this, and potentially improving on this feature collaboratively.

Holy heck - that’s a fantastic PR. I’ll take a closer look later today, but it already seems better than my quick hack, which only worked with GIFs anyway.

Gitkubikon avatar Nov 09 '25 12:11 Gitkubikon

does it have game mode support for example when game mode is enabled it pauses the background as a static image?

AleksElixir avatar Dec 02 '25 20:12 AleksElixir