hyprrust 0.2.1

A crate that provides an interface with the Hyprland sockets.
Documentation
use hyprrust::events::{EventFilter, HyprlandEventType};
use hyprrust::HyprlandConnection;

#[tokio::main]
async fn main() {
    let mut conn = HyprlandConnection::current().unwrap();

    // This filter includes everything present in the list
    let mut filter = EventFilter::from_iter([
        HyprlandEventType::ActiveWindow,
        HyprlandEventType::ActiveWindowV2,
        HyprlandEventType::WindowTitle,
        HyprlandEventType::WindowTitleV2,
        HyprlandEventType::DestroyWorkspace,
        HyprlandEventType::DestroyWorkspaceV2,
    ]);

    // Set the filter so it includes everything except what was in the list
    filter.set_include(false);

    let mut rx = conn.listen_to_events(filter).await.unwrap();
    while let Ok(ev) = rx.recv().await {
        println!("got {:?}", ev);
    }
}