zellij-org / zellij

A terminal workspace with batteries included
https://zellij.dev
MIT License
21.87k stars 663 forks source link

feat(plugins): add stringified layout to switch_session_with_layout #3503

Closed imsnif closed 4 months ago

imsnif commented 4 months ago

When switching sessions through the plugin API, there is now an option to provide a stringified layout rather than one of the builtin ones, from a file or from a URL.

eg.

switch_session_with_layout(Some("my-cool-session-name"), LayoutInfo::Stringified("
layout {
    tab split_direction=\"vertical\" {
        pane;
        pane;
    }
    tab {
        pane
        pane;
        pane;
    }
}".to_owned()), Some("/tmp".into()));