//! What this machine's display server will say about its monitors. //! //! The same probe the application runs at startup, printed instead of used. //! It exists for the reason `keyring_check` does: the answer depends entirely //! on the desktop the code is running on, so the only way to know which //! acquisition path a given machine takes is to ask it there. //! //! cargo run -p dr-plat --example display_probe fn main() { env_logger::init(); let survey = dr_plat::DisplaySurvey::probe(); println!("display server: {}", survey.server.label()); println!(); for (index, display) in survey.displays.iter().enumerate() { println!("[{index}] {}", display.name); println!(" space: {}", display.profile.space.label()); println!(" reading: {}", display.profile.describe()); println!( " source: {:?} measured: {} approximated: {}", display.profile.source, display.profile.source.is_measured(), display.profile.approximated ); match display.bounds { Some(b) => println!( " bounds: {}×{} at ({}, {})", b.width, b.height, b.x, b.y ), // Expected on Wayland; see `DisplaySurvey::containing`. None => println!(" bounds: not stated by this display server"), } println!(); } }