18 unstable releases (3 breaking)

Uses new Rust 2021

0.3.2 Jul 31, 2022
0.3.1 Jul 24, 2022
0.2.1 Jul 19, 2022
0.1.3 Jul 8, 2022
0.0.9 Apr 17, 2022

#173 in Unix APIs

Download history 55/week @ 2022-04-22 42/week @ 2022-04-29 67/week @ 2022-05-06 269/week @ 2022-05-13 42/week @ 2022-05-20 50/week @ 2022-05-27 114/week @ 2022-06-03 46/week @ 2022-06-10 44/week @ 2022-06-17 41/week @ 2022-06-24 148/week @ 2022-07-01 189/week @ 2022-07-08 203/week @ 2022-07-15 264/week @ 2022-07-22 312/week @ 2022-07-29 179/week @ 2022-08-05

980 downloads per month
Used in fewer than 6 crates

Custom license and maybe LGPL-2.1

14KB
353 lines

display-info

Cross-platform get display info for MacOS、Windows、Linux. Like electron Display Object

example

use display_info::DisplayInfo;
use std::time::Instant;

fn main() {
  let start = Instant::now();

  let display_infos = DisplayInfo::all().unwrap();
  for display_info in display_infos {
    println!("display_info {:?}", display_info);
  }
  let display_info = DisplayInfo::from_point(100, 100).unwrap();
  println!("display_info {:?}", display_info);
  println!("运行耗时: {:?}", start.elapsed());
}

Linux requirements

On Linux, you need to install libxcblibxrandr

Debian/Ubuntu:

apt-get install libxcb1 libxrandr2

Alpine:

apk add libxcb1 libxrandr2

Dependencies

~0–50MB
~851K SLoC