mirror of
https://github.com/dylanaraps/pywal.git
synced 2024-11-29 03:13:47 +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():
|
def get_desktop_env():
|
||||||
"""Identify the current running desktop environment."""
|
"""Identify the current running desktop environment."""
|
||||||
desktop = os.getenv("XDG_CURRENT_DESKTOP")
|
desktop = os.environ.get("XDG_CURRENT_DESKTOP")
|
||||||
if desktop:
|
if desktop:
|
||||||
return desktop
|
return desktop
|
||||||
|
|
||||||
desktop = os.getenv("DESKTOP_SESSION")
|
desktop = os.environ.get("DESKTOP_SESSION")
|
||||||
if desktop:
|
if desktop:
|
||||||
return desktop
|
return desktop
|
||||||
|
|
||||||
desktop = os.getenv("GNOME_DESKTOP_SESSION_ID")
|
desktop = os.environ.get("GNOME_DESKTOP_SESSION_ID")
|
||||||
if desktop:
|
if desktop:
|
||||||
return "GNOME"
|
return "GNOME"
|
||||||
|
|
||||||
desktop = os.getenv("MATE_DESKTOP_SESSION_ID")
|
desktop = os.environ.get("MATE_DESKTOP_SESSION_ID")
|
||||||
if desktop:
|
if desktop:
|
||||||
return "MATE"
|
return "MATE"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user