diff options
| author | rustn00b <83183600+rustn00b@users.noreply.github.com> | 2025-01-10 06:03:19 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-10 06:03:19 +0000 |
| commit | 5958d3be62b3abe21613567af28beb4d7d118205 (patch) | |
| tree | 1d270b02f5c807c527c8ca236fa7494181612610 /niri-ipc | |
| parent | 142e57450dae5eba25b7f306d3c6dc9f51518a3d (diff) | |
| download | niri-5958d3be62b3abe21613567af28beb4d7d118205.tar.gz niri-5958d3be62b3abe21613567af28beb4d7d118205.tar.bz2 niri-5958d3be62b3abe21613567af28beb4d7d118205.zip | |
Allow workspace names to be changed dynamically (#904)
* Add un/set workspace name actions
* Add SetWorkspaceName reference to proptests
* Simplify unname_workspace
* Add ewaf version of set first workspace name test
* Simplify more
* Fix comment
* Make workspace in set-workspace-name a positional option
---------
Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
Diffstat (limited to 'niri-ipc')
| -rw-r--r-- | niri-ipc/src/lib.rs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/niri-ipc/src/lib.rs b/niri-ipc/src/lib.rs index 53ed4d7e..f5042a9e 100644 --- a/niri-ipc/src/lib.rs +++ b/niri-ipc/src/lib.rs @@ -354,6 +354,34 @@ pub enum Action { MoveWorkspaceDown {}, /// Move the focused workspace up. MoveWorkspaceUp {}, + /// Set the name of a workspace. + #[cfg_attr( + feature = "clap", + clap(about = "Set the name of the focused workspace") + )] + SetWorkspaceName { + /// New name for the workspace. + #[cfg_attr(feature = "clap", arg())] + name: String, + + /// Reference (index or name) of the workspace to name. + /// + /// If `None`, uses the focused workspace. + #[cfg_attr(feature = "clap", arg(long))] + workspace: Option<WorkspaceReferenceArg>, + }, + /// Unset the name of a workspace. + #[cfg_attr( + feature = "clap", + clap(about = "Unset the name of the focused workspace") + )] + UnsetWorkspaceName { + /// Reference (index or name) of the workspace to unname. + /// + /// If `None`, uses the focused workspace. + #[cfg_attr(feature = "clap", arg())] + reference: Option<WorkspaceReferenceArg>, + }, /// Focus the monitor to the left. FocusMonitorLeft {}, /// Focus the monitor to the right. |
