From 4376dc55beb9c5ca6c06432bfe7d2b38169493d0 Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Sat, 21 Jan 2023 13:09:53 -0800 Subject: [PATCH] Don't set so many parameters. It was upsetting i3. --- src/lib.rs | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 1ee348d..9b4d510 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,9 +1,11 @@ -use std::collections::HashMap; -use std::fmt; -use std::fs::File; -use std::io::{self, BufRead, BufReader}; -use std::path::Path; -use std::process::{Command, Output}; +use std::{ + collections::HashMap, + fmt, + fs::File, + io::{self, BufRead, BufReader}, + path::Path, + process::{Command, Output}, +}; use regex::Regex; use thiserror::Error; @@ -106,6 +108,16 @@ impl Screen { None => return Err(CommandError::MissingMonitor(self.name.to_string())), }; + Ok(format!( + "{connection}: {w}x{h} {x:+}{y:+} {{ForceCompositionPipeline=On, Rotation={rotation}}}", + connection = connection, + w = width, + h = height, + x = x, + y = y, + rotation = rotation, + )) + /* Ok(format!("{connection}: {w}x{h} @{in_w}x{in_h} {x:+}{y:+} {{ForceCompositionPipeline=On, ViewPortIn={in_w}x{in_h}, ViewPortOut={w}x{h}+0+0, Rotation={rotation}}}", connection=connection, w=width, @@ -116,6 +128,7 @@ impl Screen { y=y, rotation=rotation, )) + */ } }