diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-09-02 09:20:23 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-09-01 23:47:19 -0700 |
| commit | f7181fb066e6390d516dfb4ee39e5812efad6f59 (patch) | |
| tree | 782630e468dc2d8f2e4b3f9da17184e80d08d434 /niri-config | |
| parent | 17ac52e1d4c28efa205d38b134bb1f32c43f9d50 (diff) | |
| download | niri-f7181fb066e6390d516dfb4ee39e5812efad6f59.tar.gz niri-f7181fb066e6390d516dfb4ee39e5812efad6f59.tar.bz2 niri-f7181fb066e6390d516dfb4ee39e5812efad6f59.zip | |
Implement by-id workspace action addressing
It's not added to clap because there's no convenient mutually-exclusive
argument enum derive yet (to have either the current <REFERENCE> or an
--id <ID>). It's not added to config parsing because I don't see how it
could be useful there. As such, it's only accessible through raw IPC.
Diffstat (limited to 'niri-config')
| -rw-r--r-- | niri-config/src/lib.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/niri-config/src/lib.rs b/niri-config/src/lib.rs index ff1fe365..9092cd21 100644 --- a/niri-config/src/lib.rs +++ b/niri-config/src/lib.rs @@ -1233,6 +1233,7 @@ impl From<niri_ipc::Action> for Action { #[derive(Debug, PartialEq, Eq, Clone)] pub enum WorkspaceReference { + Id(u64), Index(u8), Name(String), } @@ -1240,6 +1241,7 @@ pub enum WorkspaceReference { impl From<WorkspaceReferenceArg> for WorkspaceReference { fn from(reference: WorkspaceReferenceArg) -> WorkspaceReference { match reference { + WorkspaceReferenceArg::Id(id) => Self::Id(id), WorkspaceReferenceArg::Index(i) => Self::Index(i), WorkspaceReferenceArg::Name(n) => Self::Name(n), } |
