From f7181fb066e6390d516dfb4ee39e5812efad6f59 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Mon, 2 Sep 2024 09:20:23 +0300 Subject: 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 or an --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. --- src/layout/workspace.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/layout/workspace.rs') diff --git a/src/layout/workspace.rs b/src/layout/workspace.rs index 26d6a785..f85ec622 100644 --- a/src/layout/workspace.rs +++ b/src/layout/workspace.rs @@ -133,6 +133,10 @@ impl WorkspaceId { pub fn get(self) -> u64 { self.0 } + + pub fn specific(id: u64) -> Self { + Self(id) + } } niri_render_elements! { -- cgit