Expand description
Wayland output manager using wlr-output-management protocol
This crate provides a simple interface to detect, monitor, and control
display outputs on Wayland compositors that support the
zwlr_output_manager_v1 protocol (wlroots-based compositors).
§Example
use wlx_monitors::{WlMonitorManager, WlMonitorEvent, WlMonitorAction};
use std::sync::mpsc::sync_channel;
let (tx, rx) = sync_channel(10);
let (action_tx, action_rx) = sync_channel(10);
let (manager, event_queue) = WlMonitorManager::new_connection(tx, action_rx).unwrap();
// Run the manager in a separate thread or async context
// to receive monitor events and send actionsStructs§
- WlMonitor
- Represents a connected monitor/display
- WlMonitor
Manager - Manages Wayland monitor/output state and communication
- WlMonitor
Mode - Represents a display mode (resolution + refresh rate) for a monitor
- WlPosition
- Represents the position of a monitor in the global coordinate space
- WlResolution
- Represents the resolution of a monitor mode
Enums§
- Action
Kind - The kind of action that failed
- WlMonitor
Action - Actions that can be sent to the monitor manager to control monitors
- WlMonitor
Event - Events emitted by the Wayland monitor manager
- WlMonitor
Manager Error - WlTransform
- Monitor transform (rotation/flip)