swww icon indicating copy to clipboard operation
swww copied to clipboard

On restart, last used picture is used instead of unicolor of `clear`

Open allergicapple opened this issue 1 year ago • 2 comments

Scenario:

  • Set a wallpaper to an image with swww img cat.jpg
  • Clear the wallpaper with swww clear 446688
  • Restart service / reboot computer / ...
  • Start swww-daemon

Excpected:

  • Wallpaper is single color sky blue again.

Actual:

  • Wallpaper is cat.

I think I misunderstand the clear command to mean something like "uniform single-color wallpaper" when it is not because I would expect swww to restore this on restart and not the last picture set with img.

What's amazing is the wallpaper is restored to the last image, even when the file has been deleted in the meantime so it seems to come from the cache?

Using latest git:

$ swww --version
swww 0.9.5-masterV3

Installed from AUR:

$ pacman -Qi swww
Installed From  : None
Name            : swww-git
Version         : 0.9.5.r172.g0db3f4e-1
Description     : Efficient animated wallpaper daemon for Wayland, controlled at runtime
Architecture    : x86_64
URL             : https://github.com/LGFae/swww
[...]

allergicapple avatar Nov 18 '24 18:11 allergicapple

Yes, swww-daemon restores wallpaper based on cache and swww img modifies it but swww clear doesn't. You can set persistent color wallpaper with swww img 0x446688.

kerty0 avatar Dec 01 '24 18:12 kerty0

Yes, swww-daemon restores wallpaper based on cache and swww img modifies it but swww clear doesn't. You can set persistent color wallpaper with swww img 0x446688.

Hm, no, that doesn't work.

  • First I was unaware I can replace a filename with 0xrrggbb as it's both not documented and actually counter-intuitive
  • Second, it does not work; the background gets replaced with vertical stripes, so unexpectedly it does something, but not a solid color

allergicapple avatar Dec 20 '24 17:12 allergicapple

Indeed, I agree that using a color for swww img is counter-intuitive. The reason we did it was because that would allow stuff like transition animations and storing colors to the cache without too much trouble (otherwise, at the time, it would have required a gigantic refactor. It's probably easier today). If the background is getting replaced with vertical stripes, that is a bug. This should work.

LGFae avatar Jun 11 '25 14:06 LGFae