zellij-org/zellij · error · std::io::Error

Swap Layout not found for

Error message

Swap Layout not found for: {}

What it means

Error "Swap Layout not found for: {}" thrown in zellij-org/zellij.

Solutions

  1. Check the layout name/file path spelling; run `zellij setup --check` to list known layouts.
  2. Create the layout file or pass --layout with a valid name.

When it happens

Trigger: Occurs at zellij-utils/src/setup.rs:202 when the operation fails: "Swap Layout not found for: {}". Currently there is no defensive handling preventing or contextualizing this failure before it surfaces.

Common situations: Typo in layout name or missing layout file in the layout directory.


AI-assisted analysis of zellij-org/zellij@bf8d23a4f7 (2026-08-19). Data as JSON: /api/errors/4f7d6f6eb725c220. Report an issue: GitHub.

Appendix: source

Thrown at zellij-utils/src/setup.rs:202

                    let content = fs::read_to_string(path)?;
                    std::io::stdout().write_all(content.as_bytes())
                },
                _ => {
                    log::error!("No layout named {custom} found");
                    return Ok(());
                },
            }
        },
    }
}

pub fn dump_specified_swap_layout(swap_layout: &str) -> std::io::Result<()> {
    match swap_layout {
        "strider" => dump_asset(STRIDER_SWAP_LAYOUT),
        "default" => dump_asset(DEFAULT_SWAP_LAYOUT),
        "compact" => dump_asset(COMPACT_BAR_SWAP_LAYOUT),
        "classic" => dump_asset(CLASSIC_SWAP_LAYOUT),
        not_found => Err(std::io::Error::new(
            std::io::ErrorKind::Other,
            format!("Swap Layout not found for: {}", not_found),
        )),
    }
}

#[cfg(not(target_family = "wasm"))]
pub fn dump_builtin_plugins(path: &PathBuf) -> Result<()> {
    for (asset_path, bytes) in ASSET_MAP.iter() {
        let plugin_path = path.join(asset_path);
        plugin_path
            .parent()
            .with_context(|| {
                format!(
                    "failed to acquire parent path of '{}'",
                    plugin_path.display()
                )
            })

View on GitHub (pinned to bf8d23a4f7)