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