diff options
| author | Dylan Araps <[email protected]> | 2018-03-15 15:28:36 +1100 |
|---|---|---|
| committer | Dylan Araps <[email protected]> | 2018-03-15 15:28:36 +1100 |
| commit | 4abbdaadcd8cc0693c2b71205d620df24a478985 (patch) | |
| tree | f0e2182b80dd6a8bf9b3fc47d00c5634c04234a1 | |
| parent | image: Fix crash when using llight themes and gif images. Closes #196 (diff) | |
| download | pywal-gif.tar.xz pywal-gif.zip | |
wallpaper: gif supportgif
| -rw-r--r-- | pywal/wallpaper.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/pywal/wallpaper.py b/pywal/wallpaper.py index e4ebb59..0a345eb 100644 --- a/pywal/wallpaper.py +++ b/pywal/wallpaper.py @@ -42,7 +42,17 @@ def xfconf(path, img): def set_wm_wallpaper(img): """Set the wallpaper for non desktop environments.""" - if shutil.which("feh"): + if shutil.which("xwinwrap") and \ + shutil.which("mpv") and \ + img.endswith(".gif"): + xww_cmd = ["xwinwrap", "-ov", "-fs", "-ni", "-nf", "-b"] + mpv_cmd = ["mpv", "--wid", "WID", "--no-config", "--loop", + "--no-config", "--no-audio", "--no-sub", + "--x11-bypass-compositor=no", + "--hwdec=auto", "--really-quiet"] + util.disown([*xww_cmd, "--", *mpv_cmd, img]) + + elif shutil.which("feh"): util.disown(["feh", "--bg-fill", img]) elif shutil.which("nitrogen"): @@ -124,6 +134,7 @@ def change(img): if not os.path.isfile(img): return + subprocess.call(["pkill", "xwinwrap"]) desktop = get_desktop_env() if OS == "Darwin": |