Merge pull request #309 from vesiv/master

Added support for AwesomeWM in the wallpaper set function
This commit is contained in:
Dylan Araps 2018-10-17 15:11:38 +11:00 committed by GitHub
commit 19710773eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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"