diff options
| author | dylan araps <dylan.araps@gmail.com> | 2017-12-17 14:45:00 +1100 |
|---|---|---|
| committer | dylan araps <dylan.araps@gmail.com> | 2017-12-17 14:45:00 +1100 |
| commit | 553ba8fd9ec25d2c49d06cf67cdec53d6870d0b3 (patch) | |
| tree | 2b0630081db23241ddcaae72fe8d8f5c00f20e64 | |
| parent | 477850b45bacefc3c1ede2d29afc2e2a44d58ee8 (diff) | |
wallpaper: Make WM faster
| -rw-r--r-- | pywal/wallpaper.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pywal/wallpaper.py b/pywal/wallpaper.py index 1521d31..598b4a5 100644 --- a/pywal/wallpaper.py +++ b/pywal/wallpaper.py @@ -31,6 +31,8 @@ def get_desktop_env(): if desktop: return "SWAY" + return "WM" + def xfconf(path, img): """Call xfconf to set the wallpaper on XFCE.""" @@ -64,7 +66,10 @@ def set_desktop_wallpaper(desktop, img): """Set the wallpaper for the desktop environment.""" desktop = str(desktop).lower() - if "xfce" in desktop or "xubuntu" in desktop: + if desktop == "WM": + set_wm_wallpaper(img) + + elif "xfce" in desktop or "xubuntu" in desktop: # XFCE requires two commands since they differ between versions. xfconf("/backdrop/screen0/monitor0/image-path", img) xfconf("/backdrop/screen0/monitor0/workspace0/last-image", img) @@ -86,9 +91,6 @@ def set_desktop_wallpaper(desktop, img): elif "sway" in desktop: util.disown(["swaymsg", "output", "*", "bg", img, "fill"]) - else: - set_wm_wallpaper(img) - def set_mac_wallpaper(img): """Set the wallpaper on macOS.""" |
