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.
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.
Name | Thumbnail |
---|---|
Cinnamon |
|
Enlightenment |
|
Gnome |
|
Kde |
|
Lxde |
|
Lxqt |
|
MacOs |
|
Mate |
|
Unity |
|
Windows |
|
Xfce |
|
Unknown |