mirror of
https://github.com/dylanaraps/pywal.git
synced 2024-11-25 17:33:09 +01:00
wallpaper: Swap to os.environ.get
This commit is contained in:
parent
0bf70c105e
commit
25870f9872
@ -8,19 +8,19 @@ from pywal import util
|
||||
|
||||
def get_desktop_env():
|
||||
"""Identify the current running desktop environment."""
|
||||
desktop = os.getenv("XDG_CURRENT_DESKTOP")
|
||||
desktop = os.environ.get("XDG_CURRENT_DESKTOP")
|
||||
if desktop:
|
||||
return desktop
|
||||
|
||||
desktop = os.getenv("DESKTOP_SESSION")
|
||||
desktop = os.environ.get("DESKTOP_SESSION")
|
||||
if desktop:
|
||||
return desktop
|
||||
|
||||
desktop = os.getenv("GNOME_DESKTOP_SESSION_ID")
|
||||
desktop = os.environ.get("GNOME_DESKTOP_SESSION_ID")
|
||||
if desktop:
|
||||
return "GNOME"
|
||||
|
||||
desktop = os.getenv("MATE_DESKTOP_SESSION_ID")
|
||||
desktop = os.environ.get("MATE_DESKTOP_SESSION_ID")
|
||||
if desktop:
|
||||
return "MATE"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user