aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-client
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2026-03-30 16:02:09 +0200
committerGitHub <noreply@github.com>2026-03-30 16:02:09 +0200
commit8ce05f0bbd58acbbca95f95ae14fdc4e866f7391 (patch)
tree57c6d9ee2231a556f938df4f2629511a711518df /zellij-client
parentdocs(changelog): recent windows fixes (diff)
downloadsl0ppij-8ce05f0bbd58acbbca95f95ae14fdc4e866f7391.tar.gz
sl0ppij-8ce05f0bbd58acbbca95f95ae14fdc4e866f7391.tar.xz
sl0ppij-8ce05f0bbd58acbbca95f95ae14fdc4e866f7391.zip
Layout string flag (#4956)
* allow sending a stringified layout with --layout-string * add --tab-id to all the things * fix windows tests * add pr
Diffstat (limited to 'zellij-client')
-rw-r--r--zellij-client/src/lib.rs36
1 files changed, 20 insertions, 16 deletions
diff --git a/zellij-client/src/lib.rs b/zellij-client/src/lib.rs
index 482a105d..b4fb2e15 100644
--- a/zellij-client/src/lib.rs
+++ b/zellij-client/src/lib.rs
@@ -772,22 +772,26 @@ pub fn start_client(
config_dir: cli_args.config_dir.clone(),
should_ignore_config: cli_args.is_setup_clean(),
configuration_options: Some(config_options.clone()),
- layout: cli_args
- .layout
- .as_ref()
- .and_then(|l| {
- LayoutInfo::from_cli(
- &config_options.layout_dir,
- &Some(l.clone()),
- std::env::current_dir().unwrap_or_else(|_| PathBuf::from(".")),
- )
- })
- .or_else(|| {
- LayoutInfo::from_config(
- &config_options.layout_dir,
- &config_options.default_layout,
- )
- }),
+ layout: if let Some(layout_string) = &cli_args.layout_string {
+ Some(LayoutInfo::Stringified(layout_string.clone()))
+ } else {
+ cli_args
+ .layout
+ .as_ref()
+ .and_then(|l| {
+ LayoutInfo::from_cli(
+ &config_options.layout_dir,
+ &Some(l.clone()),
+ std::env::current_dir().unwrap_or_else(|_| PathBuf::from(".")),
+ )
+ })
+ .or_else(|| {
+ LayoutInfo::from_config(
+ &config_options.layout_dir,
+ &config_options.default_layout,
+ )
+ })
+ },
terminal_window_size: full_screen_ws,
data_dir: cli_args.data_dir.clone(),
is_debug: cli_args.debug,