wayfire-rs is a high-level Rust interface for Wayfire, offering comprehensive control over the wayfire compositor through its IPC protocol.
- Rust: Ensure you have Rust installed. You can install Rust using rustup.
To include wayfire-rs
in your Rust project, add it to your Cargo.toml
:
[dependencies]
wayfire-rs = "0.2.1"
Basic usage in wayfire-rs/examples folder and lots of examples in wayfire-rs/src/main.rs
get_view
- Retrieves information about a specific viewget_focused_view
- Gets the currently focused viewget_view_alpha
- Retrieves the transparency (alpha) value of a viewset_view_alpha
- Sets the transparency (alpha) value of a viewset_view_always_on_top
- Toggles "always on top" state for a viewset_view_fullscreen
- Toggles fullscreen mode for a viewset_view_sticky
- Toggles sticky (visible on all workspaces) stateset_view_minimized
- Minimizes or restores a viewsend_view_to_back
- Sends a view to the back of the stacking orderclose_view
- Closes a viewconfigure_view
- Adjusts view geometry (position/size) and output assignmentset_focus
- Focuses a specific viewassign_slot
- Assigns view to a grid slot (e.g., "grid/left")
get_output
- Retrieves information about a specific outputget_focused_output
- Gets the currently focused outputcreate_headless_output
- Creates a virtual output with specified dimensionsdestroy_headless_output
- Removes a headless output (by ID or name)
get_tiling_layout
- Retrieves layout for a workspaceset_tiling_layout
- Configures workspace layoutset_workspace
- Moves view to specific workspace on an outputwset_info
- Gets workspace set informationtoggle_showdesktop
- Toggles show-desktop mode (minimizes/restores all views)
expo_toggle
- Toggles workspace overview (Expo)scale_toggle
- Toggles window overview (Scale)scale_toggle_all
- Toggles Scale for all windowscube_activate
- Activates 3D workspace cubecube_rotate_left
- Rotates cube leftcube_rotate_right
- Rotates cube right
get_cursor_position
- Retrieves current (x,y) cursor coordinatesconfigure_input_device
- Enables/disables input devices
watch
- Subscribes to window-rules events (with optional filter)
get_configuration
- Retrieves Wayfire's full configurationget_option_value
- Gets value of a specific config option
If you want to contribute to the wayfire-rs project, follow these steps:
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.