mirror of
https://github.com/dylanaraps/pywal.git
synced 2024-11-29 11:24:03 +01:00
wallpaper: Add support for sway
This commit is contained in:
parent
245c7fe9b2
commit
477850b45b
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user