gnome-randr 0.1.0

A reimplementation of xrandr for Gnome on Wayland
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use gnome_randr::display_config::{physical_monitor::PhysicalMonitor, ApplyConfig};

use super::Action;

pub struct PrimaryAction {}

impl<'a> Action<'a> for PrimaryAction {
    fn apply(&self, config: &mut ApplyConfig<'a>, _: &PhysicalMonitor) {
        config.primary = true;
    }
}

impl std::fmt::Display for PrimaryAction {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "setting monitor as primary")
    }
}