window_list/
window_list.rs

1// Copyright (C) 2024 Tristan Gerritsen <tristan@thewoosh.org>
2// All Rights Reserved.
3
4use ui_automation::UIAutomation;
5
6fn main() {
7    let ui = UIAutomation::new();
8
9    for app in ui.applications() {
10        println!("App {} {:?}", app.name(), app.owner().pid());
11        for window in app.windows() {
12            println!("  {} @ {}", window.title(), window.position());
13        }
14    }
15}