def get_desktop():
 if (('KDE_FULL_SESSION' in os.environ) or ('KDE_MULTIHEAD' in os.environ)):
  return 'KDE'
 elif (('GNOME_DESKTOP_SESSION_ID' in os.environ) or ('GNOME_KEYRING_SOCKET' in os.environ)):
  return 'GNOME'
 elif (sys.platform == 'darwin'):
  return 'Mac OS X'
 elif hasattr(os, 'startfile'):
  return 'Windows'
 elif _is_xfce():
  return 'XFCE'
 if _is_x11():
  return 'X11'
 else:
  return None

def get_desktop ( ) : if ( ( 'KDE_FULL_SESSION' in os . environ ) or ( 'KDE_MULTIHEAD' in os . environ ) ) : return 'KDE' elif ( ( 'GNOME_DESKTOP_SESSION_ID' in os . environ ) or ( 'GNOME_KEYRING_SOCKET' in os . environ ) ) : return 'GNOME' elif ( sys . platform == 'darwin' ) : return 'Mac OS X' elif hasattr ( os , 'startfile' ) : return 'Windows' elif _is_xfce ( ) : return 'XFCE' if _is_x11 ( ) : return 'X11' else : return None
detect the current desktop environment .