Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 749 Bytes

README.md

File metadata and controls

35 lines (24 loc) · 749 Bytes

window_titles

window_titles is a small crossplatform utility crate with the only job of getting the titles of windows.

It supports:

  • Linux / x11: Using xcb to query the x11 server. (Safe)
  • Windows: Using winapi. (Possibly Unsafe)
  • MacOS: Using the osascript command. (Safe)

Usage is simple:

  1. Import both Connection and ConnectionTrait.
use window_titles::{Connection, ConnectionTrait};
  1. Initiate the connection (Only Linux can return an error for this method).
let connection = Connection::new()?;
  1. Get the window titles.
let titles: Vec<String> = connection.window_titles()?;