aboutsummaryrefslogtreecommitdiff
path: root/niri-ipc/src
diff options
context:
space:
mode:
authornyx <nnyyxxxx@protonmail.com>2025-03-29 02:40:08 -0400
committerGitHub <noreply@github.com>2025-03-29 06:40:08 +0000
commit0db48e2f1bf001bfd05c686002ff1998d0f1205b (patch)
treeafc86c3f1652675750f3c6d0db0c6e0d932d4438 /niri-ipc/src
parent7cfecf4b1b9b8c11c80061fb31926f888228499d (diff)
downloadniri-0db48e2f1bf001bfd05c686002ff1998d0f1205b.tar.gz
niri-0db48e2f1bf001bfd05c686002ff1998d0f1205b.tar.bz2
niri-0db48e2f1bf001bfd05c686002ff1998d0f1205b.zip
Add focus argument to move-window-to-workspace (#1332)
* layout: add focus flag to move-window-to-workspace * lib: update comment * misc: minor dup refactor * input: format code * layout: minor nit * layout: update comment * input: remove unnecessary conditionals * misc: replace boolean * tests: fix the failing one * layout: change to smart * ipc: Option<bool> -> bool * lib: format code * Rewrite focus doc comment --------- Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
Diffstat (limited to 'niri-ipc/src')
-rw-r--r--niri-ipc/src/lib.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/niri-ipc/src/lib.rs b/niri-ipc/src/lib.rs
index 591c1bf6..fb90dbe7 100644
--- a/niri-ipc/src/lib.rs
+++ b/niri-ipc/src/lib.rs
@@ -426,6 +426,14 @@ pub enum Action {
/// Reference (index or name) of the workspace to move the window to.
#[cfg_attr(feature = "clap", arg())]
reference: WorkspaceReferenceArg,
+
+ /// Whether the focus should follow the moved window.
+ ///
+ /// If `true` (the default) and the window to move is focused, the focus will follow the
+ /// window to the new workspace. If `false`, the focus will remain on the original
+ /// workspace.
+ #[cfg_attr(feature = "clap", arg(long, action = clap::ArgAction::Set, default_value_t = true))]
+ focus: bool,
},
/// Move the focused column to the workspace below.
MoveColumnToWorkspaceDown {},