changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > core / rust/lib/obj/src/config/display.rs

changeset 698: 96958d3eb5b0
parent: c7165d93a9eb
author: Richard Westhaver <ellis@rwest.io>
date: Fri, 04 Oct 2024 22:04:59 -0400
permissions: -rw-r--r--
description: fixes
1 //! cfg::config::display
2 //!
3 //! The structs in this module pertain to PHYSICAL Display
4 //! configurations. They immplement functionality intended for use in
5 //! OS system and user configurations. For example: xrandr
6 //! configuration.
7 use serde::{Deserialize, Serialize};
8 
9 /// Display configuration
10 #[derive(Serialize, Deserialize, Debug, Hash)]
11 pub struct DisplayConfig {
12  pub name: String,
13  pub resolution: (u16, u16),
14  pub output: String,
15  pub primary: bool,
16  pub pos: String,
17  pub rotate: String,
18 }
19 
20 impl Default for DisplayConfig {
21  fn default() -> Self {
22  DisplayConfig {
23  name: "".to_string(),
24  output: "".to_string(),
25  resolution: (1920, 1080),
26  primary: true,
27  pos: "0x0".to_string(),
28  rotate: "normal".to_string(),
29  }
30  }
31 }