desktop 1.0.5

Detects the target platform and it's architecture, vendor and desktop environment
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::os_name::ret_os_name;

pub fn ret_environment() -> &'static str {
    if cfg!(not(target_os = "linux")) {
        ret_os_name()
    } else {
        match option_env!("XDG_CURRENT_DESKTOP") {
            Some(v) => v,
            None => ret_os_name()
        }
    }
}