anufrievroman / waypaper

GUI wallpaper manager for Wayland and Xorg Linux systems
https://anufrievroman.gitbook.io/waypaper
GNU General Public License v3.0
277 stars 11 forks source link

Updating wallpaper tries to use swaybg? #23

Closed OfficialCRUGG closed 6 months ago

OfficialCRUGG commented 6 months ago

I do not have swaybg installed on my system, only swww, which is also the only & selected option in the Waypaper UI. When trying to run waypaper --restore, it tries to use swaybg, I manually need to specify swww for it to work. More problematic, the UI itself also tries to use swaybg (even though, as mentioned, swww is selected in the UI) failing. This causes me to manually need to run the refresh command (with backend specified) for wallpapers to update.

anufrievroman commented 6 months ago

Hi, let's see. If you mean that you see errors in the terminal like:

swaybg: no process found
Error: "There seems to already be another instance running..."

That is normal. That does not mean anything is wrong, it's just that every time it tries to kill swaybg in case it's running because otherwise it causes problems when switching backends (I just removed this behavior in 7d912f4dfbb02dd000ff3f1a16b392d6f75e985b). However, despite these errors, the wallpaper should be set alright. Is it so, or what exactly do you mean that it's failing?

OfficialCRUGG commented 6 months ago

Output upon clicking a wallpaper in the UI is

Selected image path: /home/crg/Wallpapers/434800.png
Error changing wallpaper: [Errno 2] No such file or directory: 'swaybg'
swaybg: no process found

The wallpaper does not update until I manually run waypaper --restore --backend swww

anufrievroman commented 6 months ago

Interesting. And how about your .config/waypaper/config.ini? There the backend is stated correctly as swww?

Anyway, I just pushed a possible fix, could you please delete your current version and try installing from current main as:

pipx install git+https://github.com/anufrievroman/waypaper
OfficialCRUGG commented 6 months ago

Actually, the config.ini had the wrong backend in it. Manually changed it to swww worked. (without the latest commit)

anufrievroman commented 6 months ago

Alright then. I think the chosen backend is supposed to be saved into the config when you use it via GUI at least once, maybe somehow it just couldn't remember which one you want to use, whereas swaybg is the default value. I'll try to improve it so that in future only existing backend could be written into config.

OfficialCRUGG commented 6 months ago

I haven't really taken a look at the codebase, so I can't confirm this, but could it be that the backend is only saved to the config when manually changing it in the dropdown? Since swww is my only backend and therefore only option, I never changed it in the dropdown, so maybe that's why it wasn't written?

anufrievroman commented 6 months ago

Actually, it makes sense. I didn't think it works like that, but it is likely so that in GUI the dropdown option is swww while internally the backend = "swaybg" unless explicitly changed. I'll fix it right now, so that the currently selected backend is saved. Thank you for reporting!

anufrievroman commented 6 months ago

Okay, I believe I fixed that bug in the current version, so I'll close this issue.