0bCdian/Waypaper-Engine

Playlist switch doesn't use Pywal scripts

WiseEXE opened this issue · 10 comments

I've been using Waypaper-engine for awhile, however once I updated my playlist to include more backgrounds, my Pywal script stopped working and swapping pics or pressing random always defaults to one image.

After closing the playlist I can change backgrounds again, however the Pywal colors still won't apply.

Ive provided the logs to my daemon

daemon.log

Hmm, that's weird, I cannot seem to reproduce the bug, I will try with a failing bash script to see if I can reproduce that. Also I would like to see what script are you running, because in the logs it says it's failing to run the script because of a syntax error in the bash script. Anyway, the failing script should not interfere with the functioning of the app (switching playlists, and setting images) so I will take a look into that. But so far with what I have I'm guessing why the colors don't apply is because of said error in the script itself.

Here is my bash script. It's just a simple pywal script to grab colors as the background changes. May I add, now whenever I add images to playlist I get a perpetual loading for every image and if I do get an image as a background, I get a notification that the daemon has crashed.

(converted to a text file for submission purposes)
pywal.txt
electron.log
daemon.log

I tested with the name of the offending image, and I get the same errors, it may be something about escaping chars in the image name that are messing with the bash script and subsequently crashing the daemon (this shouldn't happen, I'm certain this is because I forgot to handle an exception in the part of the code that runs the external scripts) it shouldn't require much effort to fix this bug so I'll get to it asap. Thanks for letting me know of this bug!

I published a new minor release with the fixes for this issue. Try it out and let me know if it's fixed for you so I can close this issue!

Just tried with the new appimage, still getting the daemon crash notification and issues adding images to the playlist sadly.

Mmm, did you stop the daemon and app after updating? Make sure nothing is running with pidof waypaper, pidof wpe-daemon, kill all those processes and try again

After killing the daemon, sww-daemon, and waypaper, now the appimage won't open the GUI or display in the taskbar. I have no idea why this is being so difficult, I can only assume its an issue with my config. I apologize.

Could you try updating the AUR packages? I am running through the downloaded appimages from the releases, maybe that might be the issue.

The appImage will require you to install all of the following:

wlr-randr
jq
socat
swww
and nodejs 20.8.2 specifically

So I would only recommend it for people using Debian or anything other than arch (In the future I will make a version that includes those dependencies in the same appImage but for now it's better just to run the aur packages).

I see you're running arch, so install the packages directly from the aur, there's a -git version and the normal one.

Make sure to delete everything first with pacman or if you're using yay -Rns waypaper-engine or whatever version you're currently running.

I'm updating the release package right now so in some minutes it should be live. Or you could use the -git version and always be at the latest changes. (I forgot to push the changes to the aur package after publishing the update, only tested the local changes but didn't actually push to the aur, my bad!)

Updated the git version and the can confirm the crashing has now stopped, but I'm still getting the "run with --logs" notifications during the invocation of my script. I'm assuming my pywal script is broken at this point.

Edit: After some inspection, I mistakingly marked a env variable in quotes making bash interpret it as a string. However the "crash" notification is still occurring although I've confirmed my script is correct.

I noticed you used single quotes in you script, the string of the file path string I'm passing in is already quoted using double quotes, so either change the bash variable to use doublequotes (this is also recommended good practice in bash generally, to avoid unintended globbing and unescaped chars from crashing your scripts) or just leave it without quotes (not recommended but in this case because I'm always passing a quoted string, it should be fine and it works as well).

I tested your script and that's why is failing, just use double quotes from now on to wrap bash variables and you'll be fine. The app and daemon won't crash anymore if the external scripts fail, so I will be closing this issue, if you find more bugs please open a new issue, and I will try to fix it as soon as possible.

This crashes.

image

Simply use double quotes to fix that.

image

I tested this and I everything is working as intended, take care!