Skip to main content

Crate wlx_monitors

Crate wlx_monitors 

Source
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 actions

Structs§

WlMonitor
Represents a connected monitor/display
WlMonitorManager
Manages Wayland monitor/output state and communication
WlMonitorMode
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§

ActionKind
The kind of action that failed
WlMonitorAction
Actions that can be sent to the monitor manager to control monitors
WlMonitorEvent
Events emitted by the Wayland monitor manager
WlMonitorManagerError
WlTransform
Monitor transform (rotation/flip)