varietywalls / variety

Wallpaper downloader and manager for Linux systems

Home Page:http://peterlevi.com/variety

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wallpaper is not changed on sway

eoli3n opened this issue · comments

Version of Variety
variety 0.8.12

Describe the bug
Wallpaper is empty, it changed on two latest Arch lately.

Context

To Reproduce

  1. Run variery with smile
  2. See that it is not working
  3. Suffer and cry

Attach Variety's log file

https://0x0.st/X-ao.txt

Desktop environment and version
Sway

OS name and version
Latest Arch Linux

Fixed mine and submitted a PR on #698 , see if it also fix yours. :)
You can also temporarily edit ~/.config/variety/scripts/set_wallpaper file and fix it yourself while it's not yet merged.

Same issue just occurred on my ubuntu 24.04 machine using Sway version 1.9. Was working yesterday, but did a restart today for some updates and now no wallpaper is visible, only gray screen.

Same version of variety 0.8.12

Fix mentioned by Rielj did not work as already had that "fi" line 242 in my set_wallpaper file.

variety_log.txt

For the log file, I started variety -v, then in the app indicator clicked next, then quit.
Unless I'm missing something, I don't see any obvious errors in the log file. Variety seems to think wallpaper is set.

I also have a debian 12 machine which is working fine. Sway 1.7 variety 0.8.10

I fixed the issue. I just noticed that my .config/variety/scripts/set_wallpaper did not match the file in Rielj's commit. I deleted this file (though there does not exist a ~/.config/data/scripts directory, only ~/.config/variety/scripts/ -- typo in comments of file?) as it says then the file will be updated to latest version upon running variety. Still did not work, and the file was still identical to what I had deleted, and not even matching the version here on the github page. I manually changed it to the version in the github. Still didn't work.

So I compared the set_wallpaper files from my ubuntu variety 0.8.12 version to my debian 0.8.10 version. They were different, and copying the debian version from my ubuntu machine fixed it. Here is the relevant sway part from the set_wallpaper script that worked.

if [[ -n $SWAYSOCK ]]; then
    # If swaybg is available, use it as prevents system freeze.
    # See https://github.com/swaywm/sway/issues/5606
    if command -v "swaybg" >/dev/null 2>&1; then
        # Grey background flicker is prevented by killing old swaybg process after new one.
        # See https://github.com/swaywm/swaybg/issues/17#issuecomment-851680720
        PID=`pidof swaybg`
        swaybg -i "$WP" -m fill &
        if [ ! -z "$PID" ]; then
            sleep 1
            kill $PID 2>/dev/null
        fi
    else
        swaymsg output "*" bg "$WP" fill 2> /dev/null
    fi
fi