Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating wallpaper tries to use swaybg? #23

Closed
OfficialCRUGG opened this issue Dec 31, 2023 · 8 comments
Closed

Updating wallpaper tries to use swaybg? #23

OfficialCRUGG opened this issue Dec 31, 2023 · 8 comments

Comments

@OfficialCRUGG
Copy link

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.

@OfficialCRUGG OfficialCRUGG changed the title Auto updating tries to use swaybg? Updating wallpaper tries to use swaybg? Dec 31, 2023
@anufrievroman
Copy link
Owner

anufrievroman commented Dec 31, 2023

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 7d912f4). However, despite these errors, the wallpaper should be set alright. Is it so, or what exactly do you mean that it's failing?

@OfficialCRUGG
Copy link
Author

OfficialCRUGG commented Dec 31, 2023

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
Copy link
Owner

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
Copy link
Author

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

@anufrievroman
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

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 added a commit that referenced this issue Dec 31, 2023
This should fix the issue #23
anufrievroman added a commit that referenced this issue Dec 31, 2023
Additional fix for issue #23
anufrievroman added a commit that referenced this issue Jan 1, 2024
This improved how the installed backnends are checked and makes sure that only installed backends are reconded into config.
This addresses the issue #23 and generally improved the code.
@anufrievroman
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants