aboutsummaryrefslogtreecommitdiff
path: root/niri-ipc
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-12-29 22:44:19 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2024-12-30 20:12:37 +0300
commit6c897d520165bfcaf3833b6e3d4bdbd836d26063 (patch)
tree29fa7697f53facfe8bca4d12cbff1cca7e9065e7 /niri-ipc
parent6cb5135f3477e63ed1738e19ba95a07ce52093ae (diff)
downloadniri-6c897d520165bfcaf3833b6e3d4bdbd836d26063.tar.gz
niri-6c897d520165bfcaf3833b6e3d4bdbd836d26063.tar.bz2
niri-6c897d520165bfcaf3833b6e3d4bdbd836d26063.zip
Add center-window by-id action
Diffstat (limited to 'niri-ipc')
-rw-r--r--niri-ipc/src/lib.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/niri-ipc/src/lib.rs b/niri-ipc/src/lib.rs
index 30704b40..1f09e912 100644
--- a/niri-ipc/src/lib.rs
+++ b/niri-ipc/src/lib.rs
@@ -292,6 +292,18 @@ pub enum Action {
ExpelWindowFromColumn {},
/// Center the focused column on the screen.
CenterColumn {},
+ /// Center a window on the screen.
+ #[cfg_attr(
+ feature = "clap",
+ clap(about = "Center the focused window on the screen")
+ )]
+ CenterWindow {
+ /// Id of the window to center.
+ ///
+ /// If `None`, uses the focused window.
+ #[cfg_attr(feature = "clap", arg(long))]
+ id: Option<u64>,
+ },
/// Focus the workspace below.
FocusWorkspaceDown {},
/// Focus the workspace above.