diff --git a/pywal/wallpaper.py b/pywal/wallpaper.py index 6d407cd..1521d31 100644 --- a/pywal/wallpaper.py +++ b/pywal/wallpaper.py @@ -27,6 +27,10 @@ def get_desktop_env(): if desktop: return "MATE" + desktop = os.environ.get("SWAYSOCK") + if desktop: + return "SWAY" + def xfconf(path, img): """Call xfconf to set the wallpaper on XFCE.""" @@ -79,6 +83,9 @@ def set_desktop_wallpaper(desktop, img): util.disown(["gsettings", "set", "org.mate.background", "picture-filename", img]) + elif "sway" in desktop: + util.disown(["swaymsg", "output", "*", "bg", img, "fill"]) + else: set_wm_wallpaper(img)