config: add move-to-output action
This commit is contained in:
parent
2a517f437a
commit
fecfd24ba0
15 changed files with 357 additions and 76 deletions
|
|
@ -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),
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue