swww icon indicating copy to clipboard operation
swww copied to clipboard

Feature request: working with swaylock-plugin

Open omgold opened this issue 10 months ago • 1 comments

Could this me made to work with swaylock-plugin?

I tried and encounted these 3 issues (that might possibly be fixed):

  1. when sway scaling is set to a fractional value swww-daemon crashes when run under swaylock-plugin:
Forked background plugin (pid = 500700): /usr/bin/swww-daemon
08:37:07 [INFO] (main) Selected wl_shm format: Bgr888
08:37:07 [INFO] (main) Initialization succeeded! Starting main loop...
08:37:07 [INFO] (transition) BumpPool with: 1 buffers. Size: 24300Kb
2025-04-24 10:37:07 - [swaylock-plugin/forward.c:346] Wallpaper program committed surface at size 1920 x 1080, which does not exactly match last acknowledged W x H = 2742 x 1542
error in client communication (pid 500698)
Forked background plugin (pid = 500722): /usr/bin/swww-daemon
Protocol error 1000 on object wl_surface@9: The wallpaper program should exactly match the configure width/height
thread 'main' panicked at daemon/src/main.rs:194:25:
Protocol error 1000 on object wl_surface@9: The wallpaper program should exactly match the configure width/height
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
08:37:07 [INFO] (main) Removed socket at "/run/user/1000/swww-wayland-0.socket"
Error: "failed to read serialized length: Connection reset by peer (os error 104)"

Not sure, why swww picks a surface size of 1920x1080.

  1. the background does not change when sending a swww img command while swaylock-anim is running. It always shows the cached one from the last run of swww-daemon. I think it should work out-of-the-box, as mpvpaper works. No idea what is going on here.

  2. It is hard to find out the correct values for the environment variables WAYLAND_DISPLAY and WAYLAND_SOCKET so swww can actually connect to the swww-daemon instance under swaylock-plugin. I could only do this manually. Maybe swww-daemon could write the connection info to a file which swww can read or something like that.

omgold avatar Apr 24 '25 08:04 omgold