5 releases
Uses new Rust 2024
| new 0.2.1 | May 24, 2026 |
|---|---|
| 0.2.0 | May 12, 2026 |
| 0.1.2 | Apr 3, 2026 |
| 0.1.1 | Mar 30, 2026 |
| 0.1.0 | Mar 30, 2026 |
#1006 in GUI
313 downloads per month
175KB
4K
SLoC
wayle-hyprland
Reactive bindings to Hyprland compositor state and events via IPC.
cargo add wayle-hyprland
Usage
HyprlandService connects to Hyprland's Unix sockets and exposes workspaces, clients, monitors, and layers as reactive Property<T> fields.
use wayle_hyprland::HyprlandService;
use futures::StreamExt;
async fn example() -> wayle_hyprland::Result<()> {
let service = HyprlandService::new().await?;
// Snapshot: print current workspace names
for ws in service.workspaces.get().iter() {
println!("Workspace {} on {}", ws.name.get(), ws.id.get());
}
// Watch: react to workspace layout changes
let mut stream = service.workspaces.watch();
while let Some(workspaces) = stream.next().await {
let names: Vec<_> = workspaces.iter().map(|ws| ws.name.get()).collect();
println!("Workspaces changed: {names:?}");
}
Ok(())
}
License
MIT
Part of wayle-services.
Dependencies
~14–24MB
~393K SLoC