Add Dell monitor in rotated orientation.

This commit is contained in:
Bill Thiede 2023-01-21 11:46:28 -08:00
parent 4a5428f3a8
commit 5efe275748

View File

@ -1,9 +1,7 @@
use anyhow::Result; use anyhow::Result;
use fixscreen::*; use fixscreen::*;
fn main() -> Result<()> { fn main() -> Result<()> {
/*
let dell = Screen { let dell = Screen {
name: ("DELL U2415".to_string()), name: ("DELL U2415".to_string()),
resolution: Resolution { resolution: Resolution {
@ -11,16 +9,19 @@ fn main() -> Result<()> {
height: 1200, height: 1200,
}, },
offset: Offset { x: 0, y: 360 }, offset: Offset { x: 0, y: 360 },
orientation: Orientation::Right,
..Default::default() ..Default::default()
}; };
*/
let lg = Screen { let lg = Screen {
name: ("LG Electronics 34UM95".to_string()), name: ("LG Electronics 34UM95".to_string()),
resolution: Resolution { resolution: Resolution {
width: 3440, width: 3440,
height: 1440, height: 1440,
}, },
offset: Offset { x: 0, y: 0 }, offset: Offset {
x: dell.resolution.height as isize,
y: 0,
},
..Default::default() ..Default::default()
}; };
let lenovo = Screen { let lenovo = Screen {
@ -30,13 +31,13 @@ fn main() -> Result<()> {
height: 1440, height: 1440,
}, },
offset: Offset { offset: Offset {
x: (lg.resolution.width) as isize, x: (dell.resolution.height + (lg.resolution.width - 2560) / 2) as isize,
y: 0, y: (lg.resolution.height) as isize,
}, },
..Default::default() ..Default::default()
}; };
let cfg = Config { let cfg = Config {
screens: vec![lg, lenovo], screens: vec![dell, lg, lenovo],
}; };
let map = screen_mapping_from_xorg_log("/var/log/X.0.log")?; let map = screen_mapping_from_xorg_log("/var/log/X.0.log")?;