1 个不稳定版本
0.2.2 | 2024年8月10日 |
---|---|
0.2.1 |
|
0.1.8 |
|
#859 在 网络编程
578 每月下载量
30KB
718 行
Wayfire-rs
wayfire-rs
是一个用于与 Wayfire(一个 Wayland 合成器)交互的 Rust 库。该项目提供通过 IPC 与 Wayfire 通信、管理视图、输出和配置等功能。
功能
- 连接到 Wayfire:建立与 Wayfire 套接字的连接。
- 发送和接收 JSON 消息:向 Wayfire 发送 JSON 消息并处理响应。
- 列出和管理视图:检索并管理视图信息。
- 列出和管理输出:获取连接到 Wayfire 的输出详细信息。
- 检索配置:访问 Wayfire 的配置详细信息。
- 处理输入设备:获取输入设备信息。
- 管理工作区:检索工作区详细信息并管理工作区集。
入门指南
先决条件
- Rust:确保您已安装 Rust。您可以使用 rustup 安装 Rust。
安装
要将 wayfire-rs
包含到您的 Rust 项目中,将其添加到您的 Cargo.toml
文件。
[dependencies]
wayfire-rs = "0.1.8"
用法
wayfire-rs/example 目录中的基本用法以及 wayfire-rs/src/main.rs 中的大量示例。
API 方法
list_views: Retrieves a list of views.
list_outputs: Retrieves a list of outputs.
list_wsets: Retrieves a list of workspace sets.
list_input_devices: Retrieves a list of input devices.
get_configuration: Retrieves Wayfire's configuration.
get_option_value: Retrieves the value of a specific configuration option.
get_output: Retrieves information about a specific output.
get_view: Retrieves information about a specific view.
get_focused_view: Retrieves information about the currently focused view.
get_focused_output: Retrieves information about the currently focused output.
贡献
如果您想为 wayfire-rs 项目做出贡献,请按照以下步骤操作
Fork the repository.
Create a new branch for your feature or bug fix.
Make your changes and test them.
Submit a pull request with a detailed description of your changes.
许可协议
wayfire-rs is licensed under the MIT License.
依赖关系
~3–10MB
~91K SLoC