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

@ -40,7 +40,7 @@
)]
use {
crate::keyboard::ModifiedKeySym,
crate::{_private::ipc::WorkspaceSource, keyboard::ModifiedKeySym, video::Connector},
serde::{Deserialize, Serialize},
std::{
fmt::{Debug, Display, Formatter},
@ -159,6 +159,13 @@ impl Workspace {
let get = get!();
get.set_workspace_capture(self, !get.get_workspace_capture(self));
}
/// Moves this workspace to another output.
///
/// This has no effect if the workspace is not currently being shown.
pub fn move_to_output(self, output: Connector) {
get!().move_to_output(WorkspaceSource::Explicit(self), output);
}
}
/// Returns the workspace with the given name.