active-win-pos-rs
A small Rust library that let's you get position and size of the active window on Windows and MacOS
Usage
Add to Cargo.toml:
[]
= "0.3.0"
Use:
use get_active_window;
Would give you a ActiveWindow struct with unique window id, process id and window position.
Or use active_win_pos_rs::get_position to get the WindowPosition only.
Build
Example
Output:
% active window: ActiveWindow { window_id: "5704", process_id: 80726, position: WindowPosition { x: 798.0, y: 193.0, width: 815.0, height: 606.0 } }