1
0
Fork 0
forked from wry/wry

config: add move-to-output action

This commit is contained in:
Julian Orth 2024-03-17 13:37:00 +01:00
parent 2a517f437a
commit fecfd24ba0
15 changed files with 357 additions and 76 deletions

View file

@ -154,6 +154,23 @@ impl Action {
})
}
Action::ConfigureIdle { idle } => Box::new(move || set_idle(Some(idle))),
Action::MoveToOutput { output, workspace } => {
let state = state.clone();
Box::new(move || {
let output = 'get_output: {
for connector in connectors() {
if connector.connected() && output.matches(connector, &state) {
break 'get_output connector;
}
}
return;
};
match workspace {
Some(ws) => ws.move_to_output(output),
None => s.move_to_output(output),
}
})
}
}
}
}