Added support for AwesomeWM in the wallpaper set function

This commit is contained in:
Vesiv 2018-10-06 02:14:11 -04:00
parent 33c8290452
commit 48c603521b

View File

@ -32,6 +32,10 @@ def get_desktop_env():
if desktop:
return "SWAY"
desktop = os.environ.get("DESKTOP_STARTUP_ID")
if desktop and "awesome" in desktop:
return "AWESOME"
return None
@ -92,10 +96,12 @@ def set_desktop_wallpaper(desktop, img):
elif "sway" in desktop:
util.disown(["swaymsg", "output", "*", "bg", img, "fill"])
elif "awesome" in desktop:
util.disown(["awesome-client", "gears.wallpaper.maximized(", img, ")"])
else:
set_wm_wallpaper(img)
def set_mac_wallpaper(img):
"""Set the wallpaper on macOS."""
db_file = "Library/Application Support/Dock/desktoppicture.db"