disable then enable
This commit is contained in:
29
src/main.rs
29
src/main.rs
@@ -74,21 +74,18 @@ fn main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO do all enables then all disables.
|
// TODO if there are no enables do nothing.
|
||||||
// TODO if there are only disables then do nothing.
|
outputs.iter()
|
||||||
for output in &outputs {
|
.for_each(|output| {
|
||||||
match output {
|
if let SwayOutput::Disabled{name} = output {
|
||||||
SwayOutput::Disabled { name } => {
|
|
||||||
println!("swaymsg output {} disabled", name);
|
println!("swaymsg output {} disabled", name);
|
||||||
// TODO run
|
|
||||||
},
|
|
||||||
SwayOutput::Enabled { name, width, height, x, y } => {
|
|
||||||
println!(
|
|
||||||
"swaymsg output {} enable dpms on mode {}x{} pos {} {}",
|
|
||||||
name, width, height, x, y);
|
|
||||||
// TODO run
|
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
}
|
outputs.iter()
|
||||||
|
.for_each(|output| {
|
||||||
}
|
if let SwayOutput::Enabled{name,width,height,x,y} = output {
|
||||||
|
println!("swaymsg output {} enable dpms on mode {}x{} pos {} {}",
|
||||||
|
name, width, height, x, y);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user