aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/plugin_api
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2024-05-15 11:20:36 +0200
committerGitHub <noreply@github.com>2024-05-15 11:20:36 +0200
commit90a62217fdd033fb2dd99b6f2ee3a945ae6b9baa (patch)
treeb0c701b1956b3eee058cfc2cd2674e74503478d3 /zellij-utils/src/plugin_api
parentchore(version): bump development version (diff)
downloadsl0ppij-90a62217fdd033fb2dd99b6f2ee3a945ae6b9baa.tar.gz
sl0ppij-90a62217fdd033fb2dd99b6f2ee3a945ae6b9baa.tar.xz
sl0ppij-90a62217fdd033fb2dd99b6f2ee3a945ae6b9baa.zip
feat(layouts): allow consuming a layout from a url (#3351)
* feat(cli): allow loading layouts directly from a url * feat(plugins): allow loading layouts directly from a url * style(fmt): rustfmt
Diffstat (limited to 'zellij-utils/src/plugin_api')
-rw-r--r--zellij-utils/src/plugin_api/event.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/zellij-utils/src/plugin_api/event.rs b/zellij-utils/src/plugin_api/event.rs
index 04380cff..f4df31f2 100644
--- a/zellij-utils/src/plugin_api/event.rs
+++ b/zellij-utils/src/plugin_api/event.rs
@@ -545,6 +545,10 @@ impl TryFrom<LayoutInfo> for ProtobufLayoutInfo {
source: "built-in".to_owned(),
name,
}),
+ LayoutInfo::Url(name) => Ok(ProtobufLayoutInfo {
+ source: "url".to_owned(),
+ name,
+ }),
}
}
}
@@ -555,6 +559,7 @@ impl TryFrom<ProtobufLayoutInfo> for LayoutInfo {
match protobuf_layout_info.source.as_str() {
"file" => Ok(LayoutInfo::File(protobuf_layout_info.name)),
"built-in" => Ok(LayoutInfo::BuiltIn(protobuf_layout_info.name)),
+ "url" => Ok(LayoutInfo::Url(protobuf_layout_info.name)),
_ => Err("Unknown source for layout"),
}
}