window-getter

Crates.iowindow-getter
lib.rswindow-getter
version0.1.1
created_at2025-09-20 09:08:08.268912+00
updated_at2025-09-23 11:54:04.877443+00
descriptionThe library for retrieving information about the windows.
homepage
repositoryhttps://github.com/tasuren/window-getter-rs
max_upload_size
id1847571
size39,544
Takagi Tasuku (tasuren)

documentation

README

window-getter-rs

This is a Rust library for retrieving information about the windows open on the OS. Currently, it only supports macOS and Windows.

Crates.io Version docs.rs

Examples

fn main() {
    let windows = window_getter::get_windows().unwrap();

    for window in windows {
        if let Ok(Some(title)) = window.title() {
            println!("{title}");
        }
    }
}

Platform supports

  • macOS
  • Windows
  • Linux?

I have no plans to make Linux support at this time due to my inexperienced knowledge about Linux. But I'd be happy to receive pull requests.

macOS permission

On macOS, you should need the permission of screen capture. Otherwise, you can't get some window informations.

You can request the screen capture permission in runtime via this crate. Example is here. In development, you can also enable screen capture permission for the apps used to run the project (such as terminal or editors).

License

This project is licensed under the MIT License.

Commit count: 89

cargo fmt