Latest monitor setup

This commit is contained in:
Bill Thiede 2024-03-24 12:58:42 -07:00
parent 5113e9d7a5
commit 3207b7704b

View File

@ -2,25 +2,15 @@ use anyhow::Result;
use fixscreen::*; use fixscreen::*;
fn main() -> Result<()> { fn main() -> Result<()> {
let dell24 = Screen { let dell43 = Screen {
name: ("DELL U2415".to_string()), name: ("DELL U4323QE".to_string()),
resolution: Resolution { resolution: Resolution {
width: 1920, width: 3840,
height: 1200, height: 2160,
}, },
offset: Offset { x: 0, y: 950 }, offset: Offset { x: 2560, y: 0 },
//orientation: Orientation::Left, //orientation: Orientation::Left,
workspaces: vec!["distortion".to_string()], workspaces: vec!["fraud".to_string()],
..Default::default()
};
let dell30 = Screen {
name: ("DELL 3007WFP".to_string()),
resolution: Resolution {
width: 2560,
height: 1600,
},
offset: Offset { x: 1920, y: 0 },
workspaces: vec!["virtue".to_string()],
..Default::default() ..Default::default()
}; };
let lenovo = Screen { let lenovo = Screen {
@ -29,9 +19,12 @@ fn main() -> Result<()> {
width: 2560, width: 2560,
height: 1440, height: 1440,
}, },
offset: Offset { x: 1920, y: 1600 }, offset: Offset {
x: 0,
y: ((dell43.resolution.height - 1440) / 2) as isize,
},
primary: true, primary: true,
workspaces: vec!["fraud".to_string()], workspaces: vec!["distortion".to_string()],
..Default::default() ..Default::default()
}; };
let lg = Screen { let lg = Screen {
@ -45,17 +38,16 @@ fn main() -> Result<()> {
// monitors have a gap, you can move the mouse between any combo. When the top monitor // monitors have a gap, you can move the mouse between any combo. When the top monitor
// is flush with the left, the bottom monitor will have a hard edge that prevents the // is flush with the left, the bottom monitor will have a hard edge that prevents the
// mouse from moving to the left monitor. // mouse from moving to the left monitor.
x: (1 + dell24.resolution.width + dell30.resolution.width.max(lenovo.resolution.width)) x: (lenovo.resolution.width + dell43.resolution.width) as isize,
as isize, y: ((dell43.resolution.height - 1440) / 2) as isize,
y: ((dell30.resolution.height + lenovo.resolution.height) / 2 - 1440 / 2) as isize,
}, },
workspaces: vec!["twilight".to_string()], workspaces: vec!["virtue".to_string()],
..Default::default() ..Default::default()
}; };
let map = screen_mapping_from_xorg_log("/var/log/X.0.log")?; let map = screen_mapping_from_xorg_log("/var/log/X.0.log")?;
let lg_connected = std::env::args().len() > 1; let lg_connected = std::env::args().len() > 1;
let mut screens = vec![dell24, dell30, lenovo]; let mut screens = vec![dell43, lenovo];
if lg_connected { if lg_connected {
screens.push(lg); screens.push(lg);
} }