3 unstable releases
| 0.2.1 | Nov 28, 2025 |
|---|---|
| 0.2.0 | Apr 24, 2025 |
| 0.1.0 | Mar 10, 2025 |
#49 in #hyprland
Used in hypr-cycle
70KB
2K
SLoC
A crate that provides a rust interface to communicate with the Hyprland sockets.
There are two types of Hyprland sockets, one used for events and one used for commands or to request data (ie. clients, decorations, etc.)
The main struct of this crate is HyprlandConnection. It's used for connecting to both
sockets (except when you need sync events, in which case you should use DetachedEventConnection).
Crate overview
Get started
By default, this crate enables both the sync and async features. It's preferred to disable
default features and include only the sync feature if you don't need async, this way
tokio is not included.
To get started add this crate to your project:
cargo add hyprrust
Module structure
This crate conatins several modules:
commandsAll implemented commands, but doesn't include arguments.commands::preludeAll commands and arguments.dataAll commands used to request data from Hyprland.errorsAll errors returned by the API of this library.eventsContains everything needed to receive sync and async events and filter them.
Examples
See the examples folder in the crates source.
Hyprrust
A crate that provides a rust interface to communicate with the Hyprland sockets.
While there are other crates that are used to communicate with the Hyprland sockets, this one might stand out because of:
- Ability to connect to more hyprland sockets/instances
- Ability to implement your own Hyprland commands
- Events can be received through an async channel
- Batching commands
- Filtering commands (both exclusion and inclusion filters)
Get started
To start, add this crate to your project:
cargo add hyprrust
Look at the examples.
And read the documentation.
Dependencies
~2–15MB
~146K SLoC