summaryrefslogtreecommitdiffstats
path: root/zellij-utils
diff options
context:
space:
mode:
Diffstat (limited to 'zellij-utils')
-rw-r--r--zellij-utils/assets/layouts/welcome.kdl8
-rw-r--r--zellij-utils/assets/prost/api.event.rs10
-rw-r--r--zellij-utils/assets/prost/api.plugin_command.rs18
-rw-r--r--zellij-utils/src/data.rs45
-rw-r--r--zellij-utils/src/errors.rs1
-rw-r--r--zellij-utils/src/input/config.rs9
-rw-r--r--zellij-utils/src/input/keybinds.rs11
-rw-r--r--zellij-utils/src/input/layout.rs122
-rw-r--r--zellij-utils/src/kdl/mod.rs50
-rw-r--r--zellij-utils/src/kdl/snapshots/zellij_utils__kdl__serialize_and_deserialize_session_info.snap4
-rw-r--r--zellij-utils/src/kdl/snapshots/zellij_utils__kdl__serialize_and_deserialize_session_info_with_data.snap7
-rw-r--r--zellij-utils/src/plugin_api/event.proto6
-rw-r--r--zellij-utils/src/plugin_api/event.rs57
-rw-r--r--zellij-utils/src/plugin_api/plugin_command.proto8
-rw-r--r--zellij-utils/src/plugin_api/plugin_command.rs30
-rw-r--r--zellij-utils/src/setup.rs71
16 files changed, 398 insertions, 59 deletions
diff --git a/zellij-utils/assets/layouts/welcome.kdl b/zellij-utils/assets/layouts/welcome.kdl
new file mode 100644
index 000000000..1884fe1f0
--- /dev/null
+++ b/zellij-utils/assets/layouts/welcome.kdl
@@ -0,0 +1,8 @@
+layout {
+ pane borderless=true {
+ plugin location="zellij:session-manager" {
+ welcome_screen true
+ }
+ }
+}
+session_serialization false // this will apply only to the initial welcome screen layout, and is intended to prevent lots of garbage sessions left around
diff --git a/zellij-utils/assets/prost/api.event.rs b/zellij-utils/assets/prost/api.event.rs
index c095bed21..6d4ed7294 100644
--- a/zellij-utils/assets/prost/api.event.rs
+++ b/zellij-utils/assets/prost/api.event.rs
@@ -172,6 +172,16 @@ pub struct SessionManifest {
pub connected_clients: u32,
#[prost(bool, tag = "5")]
pub is_current_session: bool,
+ #[prost(message, repeated, tag = "6")]
+ pub available_layouts: ::prost::alloc::vec::Vec<LayoutInfo>,
+}
+#[allow(clippy::derive_partial_eq_without_eq)]
+#[derive(Clone, PartialEq, ::prost::Message)]
+pub struct LayoutInfo {
+ #[prost(string, tag = "1")]
+ pub name: ::prost::alloc::string::String,
+ #[prost(string, tag = "2")]
+ pub source: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
diff --git a/zellij-utils/assets/prost/api.plugin_command.rs b/zellij-utils/assets/prost/api.plugin_command.rs
index d9b528ae6..5127bb81b 100644
--- a/zellij-utils/assets/prost/api.plugin_command.rs
+++ b/zellij-utils/assets/prost/api.plugin_command.rs
@@ -5,7 +5,7 @@ pub struct PluginCommand {
pub name: i32,
#[prost(
oneof = "plugin_command::Payload",
- tags = "2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50"
+ tags = "2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 60"
)]
pub payload: ::core::option::Option<plugin_command::Payload>,
}
@@ -112,10 +112,18 @@ pub mod plugin_command {
CliPipeOutputPayload(super::CliPipeOutputPayload),
#[prost(message, tag = "50")]
MessageToPluginPayload(super::MessageToPluginPayload),
+ #[prost(message, tag = "60")]
+ KillSessionsPayload(super::KillSessionsPayload),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
+pub struct KillSessionsPayload {
+ #[prost(string, repeated, tag = "1")]
+ pub session_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
+}
+#[allow(clippy::derive_partial_eq_without_eq)]
+#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CliPipeOutputPayload {
#[prost(string, tag = "1")]
pub pipe_name: ::prost::alloc::string::String,
@@ -171,6 +179,8 @@ pub struct SwitchSessionPayload {
pub pane_id: ::core::option::Option<u32>,
#[prost(bool, optional, tag = "4")]
pub pane_id_is_plugin: ::core::option::Option<bool>,
+ #[prost(message, optional, tag = "5")]
+ pub layout: ::core::option::Option<super::event::LayoutInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
@@ -376,6 +386,8 @@ pub enum CommandName {
BlockCliPipeInput = 77,
CliPipeOutput = 78,
MessageToPlugin = 79,
+ DisconnectOtherClients = 80,
+ KillSessions = 81,
}
impl CommandName {
/// String value of the enum field names used in the ProtoBuf definition.
@@ -464,6 +476,8 @@ impl CommandName {
CommandName::BlockCliPipeInput => "BlockCliPipeInput",
CommandName::CliPipeOutput => "CliPipeOutput",
CommandName::MessageToPlugin => "MessageToPlugin",
+ CommandName::DisconnectOtherClients => "DisconnectOtherClients",
+ CommandName::KillSessions => "KillSessions",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
@@ -549,6 +563,8 @@ impl CommandName {
"BlockCliPipeInput" => Some(Self::BlockCliPipeInput),
"CliPipeOutput" => Some(Self::CliPipeOutput),
"MessageToPlugin" => Some(Self::MessageToPlugin),
+ "DisconnectOtherClients" => Some(Self::DisconnectOtherClients),
+ "KillSessions" => Some(Self::KillSessions),
_ => None,
}
}
diff --git a/zellij-utils/src/data.rs b/zellij-utils/src/data.rs
index f1e01115d..d001b75fb 100644
--- a/zellij-utils/src/data.rs
+++ b/zellij-utils/src/data.rs
@@ -765,6 +765,28 @@ pub struct SessionInfo {
pub panes: PaneManifest,
pub connected_clients: usize,
pub is_current_session: bool,
+ pub available_layouts: Vec<LayoutInfo>,
+}
+
+#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize)]
+pub enum LayoutInfo {
+ BuiltIn(String),
+ File(String),
+}
+
+impl LayoutInfo {
+ pub fn name(&self) -> &str {
+ match self {
+ LayoutInfo::BuiltIn(name) => &name,
+ LayoutInfo::File(name) => &name,
+ }
+ }
+ pub fn is_builtin(&self) -> bool {
+ match self {
+ LayoutInfo::BuiltIn(_name) => true,
+ LayoutInfo::File(_name) => false,
+ }
+ }
}
use std::hash::{Hash, Hasher};
@@ -1032,12 +1054,12 @@ impl MessageToPlugin {
self
}
pub fn new_plugin_instance_should_float(mut self, should_float: bool) -> Self {
- let mut new_plugin_args = self.new_plugin_args.get_or_insert_with(Default::default);
+ let new_plugin_args = self.new_plugin_args.get_or_insert_with(Default::default);
new_plugin_args.should_float = Some(should_float);
self
}
pub fn new_plugin_instance_should_replace_pane(mut self, pane_id: PaneId) -> Self {
- let mut new_plugin_args = self.new_plugin_args.get_or_insert_with(Default::default);
+ let new_plugin_args = self.new_plugin_args.get_or_insert_with(Default::default);
new_plugin_args.pane_id_to_replace = Some(pane_id);
self
}
@@ -1045,17 +1067,17 @@ impl MessageToPlugin {
mut self,
pane_title: impl Into<String>,
) -> Self {
- let mut new_plugin_args = self.new_plugin_args.get_or_insert_with(Default::default);
+ let new_plugin_args = self.new_plugin_args.get_or_insert_with(Default::default);
new_plugin_args.pane_title = Some(pane_title.into());
self
}
pub fn new_plugin_instance_should_have_cwd(mut self, cwd: PathBuf) -> Self {
- let mut new_plugin_args = self.new_plugin_args.get_or_insert_with(Default::default);
+ let new_plugin_args = self.new_plugin_args.get_or_insert_with(Default::default);
new_plugin_args.cwd = Some(cwd);
self
}
pub fn new_plugin_instance_should_skip_cache(mut self) -> Self {
- let mut new_plugin_args = self.new_plugin_args.get_or_insert_with(Default::default);
+ let new_plugin_args = self.new_plugin_args.get_or_insert_with(Default::default);
new_plugin_args.skip_cache = true;
self
}
@@ -1066,6 +1088,17 @@ pub struct ConnectToSession {
pub name: Option<String>,
pub tab_position: Option<usize>,
pub pane_id: Option<(u32, bool)>, // (id, is_plugin)
+ pub layout: Option<LayoutInfo>,
+}
+
+impl ConnectToSession {
+ pub fn apply_layout_dir(&mut self, layout_dir: &PathBuf) {
+ if let Some(LayoutInfo::File(file_path)) = self.layout.as_mut() {
+ *file_path = Path::join(layout_dir, &file_path)
+ .to_string_lossy()
+ .to_string();
+ }
+ }
}
#[derive(Debug, Default, Clone)]
@@ -1228,4 +1261,6 @@ pub enum PluginCommand {
BlockCliPipeInput(String), // String => pipe name
CliPipeOutput(String, String), // String => pipe name, String => output
MessageToPlugin(MessageToPlugin),
+ DisconnectOtherClients,
+ KillSessions(Vec<String>), // one or more session names
}
diff --git a/zellij-utils/src/errors.rs b/zellij-utils/src/errors.rs
index 26ad521c3..5b3233998 100644
--- a/zellij-utils/src/errors.rs
+++ b/zellij-utils/src/errors.rs
@@ -442,6 +442,7 @@ pub enum ServerContext {
UnblockCliPipeInput,
CliPipeOutput,
AssociatePipeWithClient,
+ DisconnectAllClientsExcept,
}
#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
diff --git a/zellij-utils/src/input/config.rs b/zellij-utils/src/input/config.rs
index 23c05d4f8..eb8fe521d 100644
--- a/zellij-utils/src/input/config.rs
+++ b/zellij-utils/src/input/config.rs
@@ -222,6 +222,15 @@ impl Config {
Err(e) => Err(ConfigError::IoPath(e, path.into())),
}
}
+ pub fn merge(&mut self, other: Config) -> Result<(), ConfigError> {
+ self.options = self.options.merge(other.options);
+ self.keybinds.merge(other.keybinds.clone());
+ self.themes = self.themes.merge(other.themes);
+ self.plugins = self.plugins.merge(other.plugins);
+ self.ui = self.ui.merge(other.ui);
+ self.env = self.env.merge(other.env);
+ Ok(())
+ }
}
#[cfg(test)]
diff --git a/zellij-utils/src/input/keybinds.rs b/zellij-utils/src/input/keybinds.rs
index eaed03fd4..ab13f711f 100644
--- a/zellij-utils/src/input/keybinds.rs
+++ b/zellij-utils/src/input/keybinds.rs
@@ -65,6 +65,17 @@ impl Keybinds {
}
ret
}
+ pub fn merge(&mut self, mut other: Keybinds) {
+ for (other_input_mode, mut other_input_mode_keybinds) in other.0.drain() {
+ let input_mode_keybinds = self
+ .0
+ .entry(other_input_mode)
+ .or_insert_with(|| Default::default());
+ for (other_action, other_action_keybinds) in other_input_mode_keybinds.drain() {
+ input_mode_keybinds.insert(other_action, other_action_keybinds);
+ }
+ }
+ }
}
// The unit test location.
diff --git a/zellij-utils/src/input/layout.rs b/zellij-utils/src/input/layout.rs
index 82dab15ee..7f65d6054 100644
--- a/zellij-utils/src/input/layout.rs
+++ b/zellij-utils/src/input/layout.rs
@@ -9,8 +9,8 @@
// If plugins should be able to depend on the layout system
// then [`zellij-utils`] could be a proper place.
use crate::{
- data::Direction,
- home::find_default_config_dir,
+ data::{Direction, LayoutInfo},
+ home::{default_layout_dir, find_default_config_dir},
input::{
command::RunCommand,
config::{Config, ConfigError},
@@ -19,6 +19,7 @@ use crate::{
setup::{self},
};
+use std::cmp::Ordering;
use std::fmt::{Display, Formatter};
use std::str::FromStr;
@@ -819,6 +820,62 @@ impl Default for LayoutParts {
}
impl Layout {
+ // the first layout will either be the default one
+ pub fn list_available_layouts(
+ layout_dir: Option<PathBuf>,
+ default_layout_name: &Option<String>,
+ ) -> Vec<LayoutInfo> {
+ let mut available_layouts = layout_dir
+ .clone()
+ .or_else(|| default_layout_dir())
+ .and_then(|layout_dir| match std::fs::read_dir(layout_dir) {
+ Ok(layout_files) => Some(layout_files),
+ Err(e) => {
+ log::error!("Failed to read layout dir: {:?}", e);
+ None
+ },
+ })
+ .map(|layout_files| {
+ let mut available_layouts = vec![];
+ for file in layout_files {
+ if let Ok(file) = file {
+ if Layout::from_path_or_default_without_config(
+ Some(&file.path()),
+ layout_dir.clone(),
+ )
+ .is_ok()
+ {
+ if let Some(file_name) = file.path().file_stem() {
+ available_layouts
+ .push(LayoutInfo::File(file_name.to_string_lossy().to_string()))
+ }
+ }
+ }
+ }
+ available_layouts
+ })
+ .unwrap_or_else(Default::default);
+ let default_layout_name = default_layout_name
+ .as_ref()
+ .map(|d| d.as_str())
+ .unwrap_or("default");
+ available_layouts.push(LayoutInfo::BuiltIn("default".to_owned()));
+ available_layouts.push(LayoutInfo::BuiltIn("strider".to_owned()));
+ available_layouts.push(LayoutInfo::BuiltIn("disable-status-bar".to_owned()));
+ available_layouts.push(LayoutInfo::BuiltIn("compact".to_owned()));
+ available_layouts.sort_by(|a, b| {
+ let a_name = a.name();
+ let b_name = b.name();
+ if a_name == default_layout_name {
+ return Ordering::Less;
+ } else if b_name == default_layout_name {
+ return Ordering::Greater;
+ } else {
+ a_name.cmp(&b_name)
+ }
+ });
+ available_layouts
+ }
pub fn stringified_from_path_or_default(
layout_path: Option<&PathBuf>,
layout_dir: Option<PathBuf>,
@@ -861,6 +918,40 @@ impl Layout {
let config = Config::from_kdl(&raw_layout, Some(config))?; // this merges the two config, with
Ok((layout, config))
}
+ pub fn from_path_or_default_without_config(
+ layout_path: Option<&PathBuf>,
+ layout_dir: Option<PathBuf>,
+ ) -> Result<Layout, ConfigError> {
+ let (path_to_raw_layout, raw_layout, raw_swap_layouts) =
+ Layout::stringified_from_path_or_default(layout_path, layout_dir)?;
+ let layout = Layout::from_kdl(
+ &raw_layout,
+ path_to_raw_layout,
+ raw_swap_layouts
+ .as_ref()
+ .map(|(r, f)| (r.as_str(), f.as_str())),
+ None,
+ )?;
+ Ok(layout)
+ }
+ pub fn from_default_assets(
+ layout_name: &Path,
+ _layout_dir: Option<PathBuf>,
+ config: Config,
+ ) -> Result<(Layout, Config), ConfigError> {
+ let (path_to_raw_layout, raw_layout, raw_swap_layouts) =
+ Layout::stringified_from_default_assets(layout_name)?;
+ let layout = Layout::from_kdl(
+ &raw_layout,
+ path_to_raw_layout,
+ raw_swap_layouts
+ .as_ref()
+ .map(|(r, f)| (r.as_str(), f.as_str())),
+ None,
+ )?;
+ let config = Config::from_kdl(&raw_layout, Some(config))?; // this merges the two config, with
+ Ok((layout, config))
+ }
pub fn from_str(
raw: &str,
path_to_raw_layout: String,
@@ -951,6 +1042,11 @@ impl Layout {
Self::stringified_compact_swap_from_assets()?,
)),
)),
+ Some("welcome") => Ok((
+ "Welcome screen layout".into(),
+ Self::stringified_welcome_from_assets()?,
+ None,
+ )),
None | Some(_) => Err(ConfigError::IoPath(
std::io::Error::new(std::io::ErrorKind::Other, "The layout was not found"),
path.into(),
@@ -982,6 +1078,10 @@ impl Layout {
Ok(String::from_utf8(setup::COMPACT_BAR_SWAP_LAYOUT.to_vec())?)
}
+ pub fn stringified_welcome_from_assets() -> Result<String, ConfigError> {
+ Ok(String::from_utf8(setup::WELCOME_LAYOUT.to_vec())?)
+ }
+
pub fn new_tab(&self) -> (TiledPaneLayout, Vec<FloatingPaneLayout>) {
self.template.clone().unwrap_or_default()
}
@@ -1024,24 +1124,10 @@ impl Layout {
swap_layout_path.as_os_str().to_string_lossy().into(),
swap_kdl_layout,
)),
- Err(e) => {
- log::warn!(
- "Failed to read swap layout file: {}. Error: {:?}",
- swap_layout_path.as_os_str().to_string_lossy(),
- e
- );
- None
- },
+ Err(_e) => None,
}
},
- Err(e) => {
- log::warn!(
- "Failed to read swap layout file: {}. Error: {:?}",
- swap_layout_path.as_os_str().to_string_lossy(),
- e
- );
- None
- },
+ Err(_e) => None,
}
}
}
diff --git a/zellij-utils/src/kdl/mod.rs b/zellij-utils/src/kdl/mod.rs
index 71f48fc4f..e911f391e 100644
--- a/zellij-utils/src/kdl/mod.rs
+++ b/zellij-utils/src/kdl/mod.rs
@@ -1,7 +1,7 @@
mod kdl_layout_parser;
use crate::data::{
- Direction, InputMode, Key, Palette, PaletteColor, PaneInfo, PaneManifest, PermissionType,
- Resize, SessionInfo, TabInfo,
+ Direction, InputMode, Key, LayoutInfo, Palette, PaletteColor, PaneInfo, PaneManifest,
+ PermissionType, Resize, SessionInfo, TabInfo,
};
use crate::envs::EnvironmentVariables;
use crate::home::{find_default_config_dir, get_layout_dir};
@@ -1986,6 +1986,31 @@ impl SessionInfo {
.and_then(|p| p.children())
.map(|p| PaneManifest::decode_from_kdl(p))
.ok_or("Failed to parse panes")?;
+ let available_layouts: Vec<LayoutInfo> = kdl_document
+ .get("available_layouts")
+ .and_then(|p| p.children())
+ .map(|e| {
+ e.nodes()
+ .iter()
+ .filter_map(|n| {
+ let layout_name = n.name().value().to_owned();
+ let layout_source = n
+ .entries()
+ .iter()
+ .find(|e| e.name().map(|n| n.value()) == Some("source"))
+ .and_then(|e| e.value().as_string());
+ match layout_source {
+ Some(layout_source) => match layout_source {
+ "built-in" => Some(LayoutInfo::BuiltIn(layout_name)),
+ "file" => Some(LayoutInfo::File(layout_name)),
+ _ => None,
+ },
+ None => None,
+ }
+ })
+ .collect()
+ })
+ .ok_or("Failed to parse available_layouts")?;
let is_current_session = name == current_session_name;
Ok(SessionInfo {
name,
@@ -1993,6 +2018,7 @@ impl SessionInfo {
panes,
connected_clients,
is_current_session,
+ available_layouts,
})
}
pub fn to_string(&self) -> String {
@@ -2017,10 +2043,25 @@ impl SessionInfo {
let mut panes = KdlNode::new("panes");
panes.set_children(self.panes.encode_to_kdl());
+ let mut available_layouts = KdlNode::new("available_layouts");
+ let mut available_layouts_children = KdlDocument::new();
+ for layout_info in &self.available_layouts {
+ let (layout_name, layout_source) = match layout_info {
+ LayoutInfo::File(name) => (name.clone(), "file"),
+ LayoutInfo::BuiltIn(name) => (name.clone(), "built-in"),
+ };
+ let mut layout_node = KdlNode::new(format!("{}", layout_name));
+ let layout_source = KdlEntry::new_prop("source", layout_source);
+ layout_node.entries_mut().push(layout_source);
+ available_layouts_children.nodes_mut().push(layout_node);
+ }
+ available_layouts.set_children(available_layouts_children);
+
kdl_document.nodes_mut().push(name);
kdl_document.nodes_mut().push(tabs);
kdl_document.nodes_mut().push(panes);
kdl_document.nodes_mut().push(connected_clients);
+ kdl_document.nodes_mut().push(available_layouts);
kdl_document.fmt();
kdl_document.to_string()
}
@@ -2506,6 +2547,11 @@ fn serialize_and_deserialize_session_info_with_data() {
panes: PaneManifest { panes },
connected_clients: 2,
is_current_session: false,
+ available_layouts: vec![
+ LayoutInfo::File("layout1".to_owned()),
+ LayoutInfo::BuiltIn("layout2".to_owned()),
+ LayoutInfo::File("layout3".to_owned()),
+ ],
};
let serialized = session_info.to_string();
let deserealized = SessionInfo::from_string(&serialized, "not this session").unwrap();
diff --git a/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__serialize_and_deserialize_session_info.snap b/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__serialize_and_deserialize_session_info.snap
index 4a231c37b..32925ec11 100644
--- a/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__serialize_and_deserialize_session_info.snap
+++ b/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__serialize_and_deserialize_session_info.snap
@@ -1,6 +1,6 @@
---
source: zellij-utils/src/kdl/mod.rs
-assertion_line: 2284
+assertion_line: 2459
expression: serialized
---
name ""
@@ -9,4 +9,6 @@ tabs {
panes {
}
connected_clients 0
+available_layouts {
+}
diff --git a/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__serialize_and_deserialize_session_info_with_data.snap b/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__serialize_and_deserialize_session_info_with_data.snap
index 99e3e03fe..8244f04ad 100644
--- a/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__serialize_and_deserialize_session_info_with_data.snap
+++ b/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__serialize_and_deserialize_session_info_with_data.snap
@@ -1,6 +1,6 @@
---
source: zellij-utils/src/kdl/mod.rs
-assertion_line: 2377
+assertion_line: 2552
expression: serialized
---
name "my session name"
@@ -78,4 +78,9 @@ panes {
}
}
connected_clients 2
+available_layouts {
+ layout1 source="file"
+ layout2 source="built-in"
+ layout3 source="file"
+}
diff --git a/zellij-utils/src/plugin_api/event.proto b/zellij-utils/src/plugin_api/event.proto
index 0d964a354..e26a9c23a 100644
--- a/zellij-utils/src/plugin_api/event.proto
+++ b/zellij-utils/src/plugin_api/event.proto
@@ -152,6 +152,12 @@ message SessionManifest {
repeated PaneManifest panes = 3;
uint32 connected_clients = 4;
bool is_current_session = 5;
+ repeated LayoutInfo available_layouts = 6;
+}
+
+message LayoutInfo {
+ string name = 1;
+ string source = 2;
}
message ResurrectableSession {
diff --git a/zellij-utils/src/plugin_api/event.rs b/zellij-utils/src/plugin_api/event.rs
index d9e5341d6..21ff1eff1 100644
--- a/zellij-utils/src/plugin_api/event.rs
+++ b/zellij-utils/src/plugin_api/event.rs
@@ -4,9 +4,9 @@ pub use super::generated_api::api::{
event::Payload as ProtobufEventPayload, CopyDestination as ProtobufCopyDestination,
Event as ProtobufEvent, EventNameList as ProtobufEventNameList,
EventType as ProtobufEventType, InputModeKeybinds as ProtobufInputModeKeybinds,
- KeyBind as ProtobufKeyBind, ModeUpdatePayload as ProtobufModeUpdatePayload,
- PaneInfo as ProtobufPaneInfo, PaneManife