use wallpaper_rs::{Desktop, DesktopEnvt}; fn main() { let d = DesktopEnvt::new().expect("Desktop environment couldn't be determined"); // This prints Ok() on success and Err() on failure println!("{:?}", d.get_wallpaper()); }