detect-desktop-environment 0.2.0

Autodetect the desktop environment
Documentation

Detect Desktop Environment

This crate helps you to detect the current desktop environment. It was inspired by the detectDE function from xdg-util.

This library is stable. If you have an issue or want to add a desktop environment, open a Github issue or send a PR. Please also report possible naming issues.

Installation

Usage

extern crate detect_desktop_environment;

use detect_desktop_environment::{DesktopEnvironment, detect};

fn main() {
  let de: DesktopEnvironment = detect();
  println!("{:?}", de);
}

This library exposes two symbols: the detect function and it return value: the DesktopValue enum. All the variants are listed below in the "Supported environments" section.

Supported environments

Name Thumbnail
Cinnamon Cinnamon
Enlightenment Enlightenment
Gnome Gnome
Kde Kde
Lxde Lxde
Lxqt Lxqt
MacOs Kde
Mate Mate
Unity Unity
Windows Windows
Xfce Xfce
Unknown