danyspin97 / wpaperd

Modern wallpaper daemon for Wayland
GNU General Public License v3.0
332 stars 26 forks source link

Wallpapers don't apply on startup #59

Closed 0xk1f0 closed 7 months ago

0xk1f0 commented 7 months ago

Hi, while adapting my tool to the newest 1.0 release I noticed that wpaperd does not apply the specified wallpapers in the config when first starting up. I need to manually issue a wpaperctl command to get it to respond, which led to a pretty ugly workaround in my tool. I don't know if this is intended?

config.toml ```toml [default] mode = "center" [any] path = "/home/k1f0/Documents/wallpapers/wallhaven-gpl8wl.jpg" [DP-1] path = "/home/k1f0/.cache/rwpspread/rwps_68c97b74c9e3fa7d_DP-1.png" [DP-2] path = "/home/k1f0/.cache/rwpspread/rwps_68c97b74c9e3fa7d_DP-2.png" ```

Steps to reproduce (Arch Linux)

  1. Build wpaperd from latest master
  2. Define a valid configuration as mentioned here
  3. Start using wpaperd or wpaperd -d
  4. No Wallpapers get applied

Current Workaround

  1. Start wpaperd
  2. After startup, manually issue either wpaperctl all-wallpapers or wpaperctl next-wallpaper
  3. Wallpaper gets applied and shows up

Would be nice if someone could confirm this to rule out an issue on my side.

danyspin97 commented 7 months ago

Hello @0xk1f0 and thank you for the report!

Did you build wpaperd in release mode? When it is built in debug mode, the image loading is quite slow and might takes a couple of seconds to load the image.

0xk1f0 commented 7 months ago

Yes, I used a modified version of this PKGBUILD, adapted for 1.0, which builds using cargo build --frozen --release. I don't think that's the issue here since the wallpapers almost instantly apply once I issue a command with wpaperctl.

danyspin97 commented 7 months ago

I can reproduce it now, let me fix it right away.

danyspin97 commented 7 months ago

Fixed by https://github.com/danyspin97/wpaperd/commit/c7d1218d21f7ca12adee8e16856ddd0a76526cd1. I also released 1.0.1 which contain the fix! Let me know if it works now :)

0xk1f0 commented 7 months ago

Works now, thanks :)