diff --git a/.ai-workspace/flock-default-setup-plan.md b/.ai-workspace/flock-default-setup-plan.md new file mode 100644 index 0000000000..188ee3979a --- /dev/null +++ b/.ai-workspace/flock-default-setup-plan.md @@ -0,0 +1,176 @@ +# Flock: good setup out of the box + +A fresh `flock` install is byte-for-byte plain Zellij. Everything that makes it +Flock — the sidebar dock, the project selector, agent badges — is opt-in through +hand-authored KDL that the user has to know to write. This plan closes that gap. + +Target: **a non-Nix user installs `flock`, runs it, and lands in the real Flock +experience.** Pointing it at project folders should take a few lines of +`config.kdl` at most, stated once. + +## Locked decisions + +| Decision | Choice | +| --- | --- | +| Bare `flock` | Always opens the project selector | +| Selector keybind | `Super s` | +| Unconfigured project list | Show nothing — no filesystem auto-discovery | +| Scope | This repo only | + +`Super s` does not reach the TUI in a number of terminals (it is intercepted by +the OS or the terminal emulator). That is a documented caveat, not a blocker — +the docs need to say so and name the rebind. + +Because the project list will not auto-discover, the *empty state* carries the +whole first-run experience. See Phase 3. + +## Current gaps + +1. **`default_layout` is unset.** `zellij-utils/assets/config/default.kdl:351` + has it commented out, so bare `flock` loads the built-in `default` layout + (tab-bar / pane / status-bar). The bundled `flock.kdl` layout — which does + have the sidebar dock — is unreachable without the user setting + `default_layout "flock"` themselves. + +2. **No keybind opens the selector.** `Alt b` toggles the dock + (`default.kdl:206`) but nothing launches the picker. Users write their own + `LaunchOrFocusPlugin` bind and restate every plugin arg. When the arg set + does not match the layout's, a *second* selector launches — the near-miss + documented in `zellij-server/src/plugins/plugin_map.rs:563`. + +3. **Selector config is stated three or more times:** the entry layout's plugin + block, the keybind body, and `sidebar_args` re-emitted into every generated + project/remote layout. There is no single "where my projects live." + +4. **New project sessions get plain Zellij.** `DEFAULT_SESSION_LAYOUT = "default"` + (`default-plugins/flock-selector/src/config.rs:22`), so a session the selector + creates has no dock unless the user authors their own project layout and points + `session_layout` at it. Remote sessions are already fine — `codespaces.rs:145` + has a built-in dock template fallback. + +5. **Zero-config selector is blank.** `root_dirs` / `individual_dirs` default to + `Vec::new()` (`config.rs:79-80`). The UI does distinguish the case + (`" no project folders configured"`, `ui.rs:291`) but the message is not + actionable. + +6. **The entry point is a shell alias over a hack layout.** The bundled + `flock-selector.kdl` keeps its session alive with + `pane command="tail" { args "-f" "/dev/null" }` and ships commented-out + placeholder args. With bare `flock` becoming the selector, this stops being a + side path and becomes *the* startup path — it has to be solid. + +## Phase 0 — ship working defaults + +Small, self-contained, no new config surface. Gets a fresh install from "plain +Zellij" to "sidebar + working selector keybind." + +- Make the built-in `flock` layout the startup **fallback**, not a shipped + `default_layout` value. `default_layout` stays unset, so a user's own + `layouts/default.kdl` is still what loads on startup; only when they have not + written one does Flock use its own layout. Setting the option instead would + skip that lookup and silently ignore a file the user expects to be their + startup layout — a breaking change for no benefit. The rule lives in two + places that must agree (`LayoutInfo::from_config` and the loader in + `layout.rs`), keyed off `FALLBACK_BUILTIN_LAYOUT`. +- `config.rs`: `DEFAULT_SESSION_LAYOUT` → `"flock"`, so selector-created + sessions get the dock. +- `default.kdl`: register `flock-selector` and `flock-sidebar` in the + `plugins {}` alias block (alias config already merges with call-site config + winning — `zellij-utils/src/input/layout.rs:122-145`). +- `default.kdl`: bind `Super s` → `LaunchOrFocusPlugin "flock-selector"` + (floating, move-to-focused-tab), alongside the existing `Alt b`. + +## Phase 1 — a `flock { }` config block + +The single source of truth. Parse a top-level `flock { }` node in +`Config::from_kdl` alongside `plugins` / `ui` / `web_client` +(`zellij-utils/src/kdl/mod.rs:4908-4938`) into a `FlockConfig` on `Config`: + +```kdl +flock { + root_dirs "~/src" "~/work" // scanned one level deep + individual_dirs "~/nixos" // each is itself one project + devcontainers true + ssh true +} +``` + +Inject the resolved `FlockConfig` **underneath** the call-site configuration for +every `zellij:flock-selector` / `zellij:flock-sidebar` instance, at plugin-load +time in `zellij-server`. Doing it there (rather than only in alias resolution) +means it applies uniformly to a direct `zellij:flock-selector` in a layout, to +the alias, and to the keybind. + +Layout args still override, so a project layout can opt out per-session. + +Two payoffs: + +- Zero args needed anywhere in the common case. +- **The duplicate-selector bug class disappears by construction.** All three call + sites now derive identical configuration, so `running_plugin_satisfies_request` + always matches instead of near-missing. + +Also add a `flock { }` key to disable the selector-on-startup behavior, so Flock +stays usable as a drop-in Zellij replacement for anyone who wants a shell when +they type `flock`. + +## Phase 2 — bare `flock` opens the selector + +Bare `flock` attaches the fixed `flock-selector` session if it is live, else +creates it. Note `--session NAME` does **not** attach when the session is already +live (`AGENTS.md:26`), so this needs real attach-or-create logic rather than a +flag. + +- Replace the `tail -f /dev/null` keepalive with something intentional now that + this is the primary startup path. +- Keep an explicit `flock pick` subcommand as well: bare `flock` is now + overloaded, and scripts and docs benefit from a name. Gets shell completion + free via the existing `setup --generate-completion`. +- `attach_to_session` is effectively subsumed — the selector lists live sessions + with agent badges, so picking one *is* attaching. Confirm the interaction + rather than assuming it. +- Explicit forms (`flock attach`, `flock --session X`, `flock -l LAYOUT`) keep + working unchanged. + +## Phase 3 — make the empty state carry first-run + +This is load-bearing: with no auto-discovery and the selector as the startup +screen, the unconfigured empty state is the first thing every new user sees. + +- Replace `" no project folders configured"` (`ui.rs:291`) with actionable text + that names the fix. +- Add an in-app "add a project folder" action that writes to the user's + `flock { }` block. Precedent already exists in the SSH tab: + `" no saved SSH hosts — Ctrl-o adds one"` (`ui.rs:333`). + +Result: a fresh install shows a picker that explains itself and gets you +configured in a few keystrokes — without scanning the filesystem behind the +user's back. + +## Phase 4 — docs and diagnostics + +- Rewrite the README "Enable Flock" section. It currently teaches arg-pasting + into layouts; it should read "works out of the box, here is how to point it at + your projects," plus the `Super s` terminal caveat and how to rebind. +- Add the `flock { }` block, commented and documented, to `default.kdl` so + `flock setup --dump-config` teaches it. +- Extend `flock setup --check` to report the resolved Flock config: project + roots, which providers are enabled, which layout is default. + +## Open risks + +- **`Super s` reachability.** Needs testing across the terminals people actually + use. If it is dead in most, the default is decorative and the docs have to lead + with the rebind. +- **Selector-always is a visible divergence from Zellij.** The opt-out in Phase 1 + is the mitigation; it should be easy to find. +- **The flock fallback changes the startup chrome for existing users** who have + no `layouts/default.kdl` and were getting the plain default layout. They keep + every pane they had plus a sidebar dock, and `default_layout "default"` opts + out. Worth a CHANGELOG note, but not breaking: anyone with their own + `default.kdl` is unaffected by construction. +- **Verifying startup layout resolution by hand is booby-trapped.** On a config + dir with no `config.kdl`, the first-run setup wizard both overrides the layout + and *writes a `config.kdl` into that directory* — which silently pollutes a + test fixture if you point the binary at one. Pre-seed a `config.kdl` in a temp + config dir when checking this by hand. diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 8672820bee..4c2e995765 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -4,7 +4,6 @@ on: push: branches: [ main ] pull_request: - branches: [ main ] workflow_dispatch: permissions: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 86d0330998..e6ddaea9d2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -4,7 +4,6 @@ on: push: branches: [main] pull_request: - branches: [main] workflow_dispatch: permissions: diff --git a/CHANGELOG.md b/CHANGELOG.md index 29878a0ec4..2858e5ac85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,29 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] +* feat(setup): make a fresh install land in Flock rather than in plain Zellij. + Everything that distinguishes Flock — the sidebar dock, the project selector, + agent status — was previously opt-in through hand-authored KDL, so `flock` with + no config behaved exactly like upstream `zellij`. Now: + - `default_layout` ships as `"flock"` (the default chrome plus the sidebar as a + left-edge dock) instead of being unset. + - `Super s` opens the project selector. + - `flock-selector` and `flock-sidebar` are registered as plugin aliases, so + their folder args are stated **once** in `config.kdl` and reach the bundled + layouts, the keybinding, and each project session's sidebar alike. The + bundled layouts now reference those aliases instead of restating args, which + removes by construction the arg-set disagreement that made a keybinding + launch a second selector. + - Sessions created from the selector default to the `flock` layout, so a + project opened through Flock has the sidebar. Previously they got Zellij's + `default` layout with no way back to the selector. + + Your own layouts still win. `default_layout` is deliberately left unset, and + the `flock` layout is a *fallback*: startup still loads your + `layouts/default.kdl` if you have written one, and only uses the built-in + `flock` layout when you have not. Naming a layout explicitly — including + `default_layout "default"` for the plain upstream Zellij chrome with no + sidebar — takes precedence as always. ## [26.10.1] - 2026-07-28 * fix(remote): make the sidebar's upgrade confirmation mouse-reachable, report diff --git a/README.md b/README.md index c856e219c5..ac0d5ac5a2 100644 --- a/README.md +++ b/README.md @@ -50,27 +50,68 @@ cargo xtask run cargo xtask test ``` -## Enable Flock +## Configure Flock -The bundled `flock-selector` and `flock-sidebar` layouts work out of the box. -Remote providers are opt-in: +Flock works with no configuration: it starts with the sidebar docked to the left +edge, and `Super s` opens the project selector. The one thing it cannot guess is +where your projects live. + +Point it at them in `~/.config/flock/config.kdl` by giving the bundled +`flock-selector` alias its folder args: ```kdl -plugin location="zellij:flock-selector" { - root_dirs "~/src" - codespaces_enabled "true" - devcontainers_enabled "true" - coder_enabled "true" +plugins { + flock-selector location="zellij:flock-selector" { + cwd "/" + root_dirs "~/src;~/work" // each scanned one level deep + individual_dirs "~/dotfiles" // each is itself one project + } + flock-sidebar location="zellij:flock-sidebar" { + cwd "/" + root_dirs "~/src;~/work" + individual_dirs "~/dotfiles" + } } +``` + +These are *aliases*, so this is the only place the args are stated — the bundled +layouts, the `Super s` keybinding, and the sidebar in each project session all +resolve through them. Run `flock setup --dump-config` to see the shipped defaults +with every option documented inline. -plugin location="zellij:flock-sidebar" { - root_dirs "~/src" - codespaces_enabled "true" - devcontainers_enabled "true" - coder_enabled "true" +If `Super s` does nothing, your terminal is intercepting `Super` (Cmd on macOS) +before Flock sees it. Bind a key that does reach the app — this adds to the +shipped binding rather than replacing it, which is harmless: + +```kdl +keybinds { + shared_except "locked" { + bind "Alt s" { + LaunchOrFocusPlugin "flock-selector" { + floating true + move_to_focused_tab true + }; + } + } } ``` +Remote providers are opt-in, because each needs an authenticated CLI on `PATH`. +Add them to the aliases above: + +```kdl +codespaces_enabled "true" +devcontainers_enabled "true" +coder_enabled "true" +ssh_enabled "true" +``` + +Your own layouts take precedence over Flock's chrome. If you have a +`~/.config/flock/layouts/default.kdl`, that is still what loads on startup — the +built-in `flock` layout is only the fallback for when you have not written one. +To get the plain upstream Zellij chrome with no sidebar, set +`default_layout "default"`. + Provider requirements: - Codespaces: authenticated `gh` CLI. diff --git a/default-plugins/flock-selector/src/config.rs b/default-plugins/flock-selector/src/config.rs index c69f6e7246..7bcb02b93a 100644 --- a/default-plugins/flock-selector/src/config.rs +++ b/default-plugins/flock-selector/src/config.rs @@ -19,7 +19,13 @@ use std::collections::BTreeMap; use std::path::{Path, PathBuf}; /// Layout new sessions open with when none is configured. -pub const DEFAULT_SESSION_LAYOUT: &str = "default"; +/// +/// The bundled `flock` layout, not Zellij's `default`: a session opened *from +/// the selector* that lacked the sidebar dock had no way back to the selector +/// and no agent status, which is the entire reason to pick a project through +/// Flock. Remote-bound sessions already default to a dock-bearing layout (see +/// `codespaces::FLOCK_LAYOUT_TEMPLATE`); this makes local ones agree. +pub const DEFAULT_SESSION_LAYOUT: &str = "flock"; pub const DEFAULT_CODER_DOTFILES_PARAMETER: &str = "dotfiles_uri"; pub const DEFAULT_CODER_DOTFILES_BRANCH_PARAMETER: &str = "dotfiles_branch"; diff --git a/zellij-utils/assets/config/default.kdl b/zellij-utils/assets/config/default.kdl index 67db2deeee..043b8d58e7 100644 --- a/zellij-utils/assets/config/default.kdl +++ b/zellij-utils/assets/config/default.kdl @@ -204,6 +204,21 @@ keybinds { // conjure a second dock pane, which is exactly what a plugin-URL pipe does // when the keybind's configuration doesn't match the layout's. bind "Alt b" { MessagePlugin { name "flock-toggle-dock"; }; } + // Open the project selector. Deliberately bound through the + // `flock-selector` *alias* (declared in the `plugins` block below) and + // with no configuration of its own: the alias is the single place the + // selector's args are stated, so this binding can never disagree with + // the layout's copy and launch a second selector. + // + // Note that `Super` (Cmd on macOS) is swallowed by some terminal + // emulators before Flock ever sees it. Rebind this to eg. "Alt s" if + // the key does nothing in your terminal. + bind "Super s" { + LaunchOrFocusPlugin "flock-selector" { + floating true + move_to_focused_tab true + }; + } } shared_except "normal" "locked" { bind "Enter" "Esc" { SwitchToMode "Normal"; } @@ -248,6 +263,51 @@ plugins { configuration location="zellij:configuration" plugin-manager location="zellij:plugin-manager" about location="zellij:about" + + // The two Flock plugins. Aliasing them here is what makes their + // configuration statable *once*: a layout, a keybinding and a generated + // remote layout can all say `location="flock-selector"` with no args, and + // every one of them resolves to the same configuration. Adding args at a + // call site still overrides the alias, so a single layout can opt out. + // + // Point the selector at your projects by giving the alias its folder args: + // + // flock-selector location="zellij:flock-selector" { + // root_dirs "~/src;~/work" // each scanned one level deep + // individual_dirs "~/dotfiles" // each is itself one project + // } + // + // The sidebar takes the same folder args and uses them to decide which + // sessions belong to which project, so keep the two in sync. + // + // Remote providers are opt-in and off by default, because each needs an + // authenticated CLI on PATH to work at all: + // + // codespaces_enabled "true" // needs an authenticated `gh` + // devcontainers_enabled "true" // needs the `devcontainer` CLI + Docker + // coder_enabled "true" // needs an authenticated `coder` + // ssh_enabled "true" // saved-hosts tab; Ctrl-o adds a host. + // // Key or agent auth is required — the + // // transport runs ssh with BatchMode=yes. + // + // Selector-only (the sidebar never creates workspaces), and applied only + // when the chosen Coder template exposes the named parameter: + // + // coder_dotfiles_uri "https://github.com/example/dotfiles.git" + // coder_dotfiles_branch "main" + // coder_dotfiles_parameter "dotfiles_uri" + // coder_dotfiles_branch_parameter "dotfiles_branch" + // + // `cwd` is a reserved plugin property: it sets the plugin's initial working + // directory (its `/host` mount) and is deliberately *not* forwarded as a + // configuration key. Both plugins need `/` because the project folders they + // scan are arbitrary host paths outside any single project. + flock-selector location="zellij:flock-selector" { + cwd "/" + } + flock-sidebar location="zellij:flock-sidebar" { + cwd "/" + } } // Plugins to load in the background when a new session starts @@ -345,9 +405,17 @@ load_plugins { // theme "default" // The name of the default layout to load on startup -// Default: "default" // (Requires restart) // +// Left unset on purpose. While it is unset, Flock loads your own +// `layouts/default.kdl` if you have written one, and only falls back to its +// built-in "flock" layout — the default chrome plus the flock-sidebar as a +// left-edge dock — when you have not. Setting this option would skip that +// lookup and ignore your `default.kdl`. +// +// Set it to name a specific layout: "default" for the plain upstream Zellij +// chrome with no sidebar, or "compact" / "classic" / "strider". +// // default_layout "compact" // Choose the mode that zellij uses when starting up. diff --git a/zellij-utils/assets/layouts/flock-selector.kdl b/zellij-utils/assets/layouts/flock-selector.kdl index 56355b13da..4fd698b40b 100644 --- a/zellij-utils/assets/layouts/flock-selector.kdl +++ b/zellij-utils/assets/layouts/flock-selector.kdl @@ -1,11 +1,12 @@ // The `flock-selector` layout floats the project picker over a fresh session — -// the cold-shell entry point for a `zf = "zellij --layout flock-selector"` -// alias, mirroring the user's `zs = "zellij --layout sessionizer"`. +// the cold-shell entry point, reached with `flock --layout flock-selector`. // -// Folder sources are passed to the plugin as KDL args, matching -// zellij-sessionizer's arg shape (individual_dirs / root_dirs / session_layout / -// cwd). The values below are placeholders — a real config (e.g. the nix module) -// overrides them by shipping its own copy of this layout, or the user edits it. +// This layout deliberately carries no folder args. The picker resolves them +// from the `flock-selector` alias in config.kdl, which is the one place they +// are stated: adding `root_dirs` there reaches this layout, the `Super s` +// keybinding, and the sidebar in every project session alike. Restating them +// here would not just be redundant — a set that disagreed with the keybinding's +// would make `Super s` miss the running picker and launch a second one. layout { // Keep the cold-selector session alive until the floating picker is ready. // An interactive default shell can exit during startup (eg. from shell @@ -16,25 +17,11 @@ layout { } floating_panes { pane { - plugin location="zellij:flock-selector" { - cwd "/" + plugin location="flock-selector" { // Rename this cold-shell entry session to a fixed name so it is // always the same session (and the sidebar hides it) instead of // a random throwaway name accumulating in the workspace list. session_name "flock-selector" - // individual_dirs "/path/to/project;/another/project" - // root_dirs "/path/to/projects;/path/to/work" - // session_layout "default" - // coder_enabled "true" - // Saved-SSH-hosts tab (Ctrl-o adds a host; key/agent auth is - // required — the transport runs ssh with BatchMode=yes). - // ssh_enabled "true" - // Optional, applied only when the selected Coder template - // exposes this conventional parameter. - // coder_dotfiles_uri "https://github.com/example/dotfiles.git" - // coder_dotfiles_branch "main" - // coder_dotfiles_parameter "dotfiles_uri" - // coder_dotfiles_branch_parameter "dotfiles_branch" } width "70%" height "70%" diff --git a/zellij-utils/assets/layouts/flock.kdl b/zellij-utils/assets/layouts/flock.kdl index 659aa1b67f..b866e2c8e7 100644 --- a/zellij-utils/assets/layouts/flock.kdl +++ b/zellij-utils/assets/layouts/flock.kdl @@ -9,8 +9,12 @@ layout { // owns which one is in effect (Alt b toggles it) and clamps both so the // content area always stays usable. `closed_size` must stay under the // sidebar's 16-column label threshold for the rail to render. + // + // Referenced through the `flock-sidebar` alias (not `zellij:flock-sidebar`) + // so the folder args a user adds to that alias in config.kdl reach the + // sidebar here without editing this layout. dock size=40 closed_size=5 { - plugin location="zellij:flock-sidebar" + plugin location="flock-sidebar" } pane size=1 borderless=true { plugin location="tab-bar" diff --git a/zellij-utils/src/data.rs b/zellij-utils/src/data.rs index ecfa8c127c..d7fd347b34 100644 --- a/zellij-utils/src/data.rs +++ b/zellij-utils/src/data.rs @@ -2104,6 +2104,25 @@ impl From for PluginInfo { } } +/// The built-in layout used on startup when the user named no layout at all — +/// no `--layout`, no `default_layout` — *and* has no `layouts/default.kdl` of +/// their own. +/// +/// Upstream Zellij falls back to its plain `default`; Flock falls back to +/// `flock`, the same chrome plus the flock-sidebar as a left-edge dock, so a +/// fresh install shows agent status and session switching with no setup. +/// +/// This is deliberately a *fallback* rather than a shipped `default_layout` +/// value: setting that option skips the `default.kdl` lookup entirely, which +/// would silently ignore a layout the user wrote and expects to be their +/// startup layout. +/// +/// Two places must agree on this rule — [`LayoutInfo::from_config`], which +/// decides what the session records it started from, and +/// [`crate::input::layout::Layout::stringified_from_path_or_default`], which +/// actually reads the KDL. Change them together. +pub const FALLBACK_BUILTIN_LAYOUT: &str = "flock"; + #[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize)] pub enum LayoutInfo { BuiltIn(String), @@ -2442,6 +2461,7 @@ impl LayoutInfo { // resolution below will correctly handle this. // The docs promise this behavior, so we have to abide: // + let layout_unspecified = maybe_layout_path.is_none(); let layout_path = maybe_layout_path .clone() .unwrap_or(PathBuf::from("default")); @@ -2486,7 +2506,14 @@ impl LayoutInfo { )); } } - // Assume a builtin layout by default + // Assume a builtin layout by default. When the caller named no layout + // at all, that builtin is Flock's rather than upstream's — see + // [`FALLBACK_BUILTIN_LAYOUT`]. Reaching here means the user has no + // `default.kdl` of their own; if they do, the lookup above returned it + // and this fallback never applies. + if layout_unspecified { + return Some(LayoutInfo::BuiltIn(FALLBACK_BUILTIN_LAYOUT.to_owned())); + } Some(LayoutInfo::BuiltIn(layout_path.display().to_string())) } } diff --git a/zellij-utils/src/input/layout.rs b/zellij-utils/src/input/layout.rs index 303955ced8..043c34c1ab 100644 --- a/zellij-utils/src/input/layout.rs +++ b/zellij-utils/src/input/layout.rs @@ -11,7 +11,10 @@ #[cfg(not(target_family = "wasm"))] use crate::downloader::Downloader; use crate::{ - data::{Direction, LayoutInfo, LayoutMetadata, LayoutParsingError, LayoutWithError}, + data::{ + Direction, LayoutInfo, LayoutMetadata, LayoutParsingError, LayoutWithError, + FALLBACK_BUILTIN_LAYOUT, + }, home::{default_layout_dir, find_default_config_dir}, input::{ command::RunCommand, @@ -1504,11 +1507,36 @@ impl Layout { Layout::stringified_from_dir(layout_path, layout_dir.as_ref()) } }, - None => Layout::stringified_from_dir( - &std::path::PathBuf::from("default"), - layout_dir.as_ref(), - ), + None => Layout::stringified_unspecified_default(layout_dir.as_ref()), + } + } + /// The startup layout when the caller named none — no `--layout`, no + /// `default_layout`. + /// + /// A user's own `layouts/default.kdl` wins: that is the file people expect to + /// be their startup layout, and the upstream docs promise it. Only when they + /// have not written one does Flock fall back to its built-in + /// [`FALLBACK_BUILTIN_LAYOUT`] instead of upstream's plain `default`. + /// + /// Must stay in step with [`LayoutInfo::from_config`], which decides the + /// `LayoutInfo` for this same case — including checking both the + /// extensionless and `.kdl` candidates, so the two cannot disagree about + /// whether a user file exists. + fn stringified_unspecified_default( + layout_dir: Option<&PathBuf>, + ) -> Result<(String, String, Option<(String, String)>), ConfigError> { + let user_default_dir = layout_dir + .map(|dir| dir.to_path_buf()) + .or_else(default_layout_dir); + if let Some(dir) = user_default_dir { + let candidate = dir.join("default"); + for path in [candidate.clone(), candidate.with_extension("kdl")] { + if path.exists() { + return Layout::stringified_from_path(&path); + } + } } + Layout::stringified_from_default_assets(Path::new(FALLBACK_BUILTIN_LAYOUT)) } #[cfg(not(target_family = "wasm"))] pub fn stringified_from_url(url: &str) -> Result { diff --git a/zellij-utils/src/input/unit/layout_test.rs b/zellij-utils/src/input/unit/layout_test.rs index bbb9caedc1..eb809883a2 100644 --- a/zellij-utils/src/input/unit/layout_test.rs +++ b/zellij-utils/src/input/unit/layout_test.rs @@ -2581,6 +2581,79 @@ fn flock_builtin_layout_loads_with_swap_layout() { .unwrap(); } +#[test] +fn flock_bundled_layout_dock_resolves_through_the_shipped_alias() { + // The bundled flock layout names the sidebar by *alias* + // (`location="flock-sidebar"`), not by `zellij:flock-sidebar`, so that folder + // args a user adds to that alias in config.kdl reach the sidebar without + // editing the layout. That indirection is silent when it breaks: an + // unresolved alias simply loads no plugin and the dock renders empty. Assert + // the shipped default config actually resolves it. + let kdl_layout = include_str!("../../../assets/layouts/flock.kdl"); + let mut layout = Layout::from_kdl(kdl_layout, Some("flock.kdl".into()), None, None).unwrap(); + + let dock_run = &dock_of(&layout).run; + assert!( + matches!(dock_run, RunPluginOrAlias::Alias(alias) if alias.name == "flock-sidebar"), + "the dock should name the sidebar by alias, got {:?}", + dock_run + ); + assert!( + dock_run.get_run_plugin().is_none(), + "an alias should be unresolved before populating" + ); + + let default_config = crate::input::config::Config::from_default_assets().unwrap(); + layout.populate_plugin_aliases_in_layout(&default_config.plugins); + + let resolved = dock_of(&layout) + .run + .get_run_plugin() + .expect("the shipped default config must define a `flock-sidebar` alias"); + assert_eq!( + resolved.location, + RunPluginLocation::parse("zellij:flock-sidebar", None).unwrap(), + "the alias must resolve to the built-in flock-sidebar plugin" + ); +} + +#[test] +fn flock_selector_bundled_layout_resolves_through_the_shipped_alias() { + // Same contract for the cold-shell picker layout. It keeps only + // `session_name` as a call-site arg; everything else must come from the + // alias, so that this layout and the `Super s` keybinding agree on + // configuration and the keybinding focuses the running picker instead of + // launching a second one. + let (layout_path, kdl_layout, _) = + Layout::stringified_from_default_assets(std::path::Path::new("flock-selector")).unwrap(); + let mut layout = Layout::from_kdl(&kdl_layout, Some(layout_path), None, None).unwrap(); + + let default_config = crate::input::config::Config::from_default_assets().unwrap(); + layout.populate_plugin_aliases_in_layout(&default_config.plugins); + + let (_, floating_panes) = layout.template.clone().expect("layout has a template"); + let selector = floating_panes + .iter() + .find_map(|pane| match pane.run.as_ref() { + Some(Run::Plugin(run)) => run.get_run_plugin(), + _ => None, + }) + .expect("the selector layout floats a resolved plugin pane"); + assert_eq!( + selector.location, + RunPluginLocation::parse("zellij:flock-selector", None).unwrap(), + ); + assert_eq!( + selector + .configuration + .inner() + .get("session_name") + .map(|s| s.as_str()), + Some("flock-selector"), + "the call-site session_name must survive alias merging" + ); +} + fn dock_of(layout: &Layout) -> &DockLayout { layout.dock.as_ref().expect("layout should have a dock") } diff --git a/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__bare_config_from_default_assets_to_string.snap b/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__bare_config_from_default_assets_to_string.snap index 62edb3854f..782615516c 100644 --- a/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__bare_config_from_default_assets_to_string.snap +++ b/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__bare_config_from_default_assets_to_string.snap @@ -172,6 +172,12 @@ keybinds clear-defaults=true { bind "Alt p" { TogglePaneInGroup; } bind "Alt Shift p" { ToggleGroupMarking; } bind "Ctrl q" { Quit; } + bind "Super s" { + LaunchOrFocusPlugin "flock-selector" { + floating true + move_to_focused_tab true + } + } } shared_except "locked" "move" { bind "Ctrl h" { SwitchToMode "move"; } @@ -267,6 +273,12 @@ plugins { filepicker location="zellij:strider" { cwd "/" } + flock-selector location="zellij:flock-selector" { + cwd "/" + } + flock-sidebar location="zellij:flock-sidebar" { + cwd "/" + } plugin-manager location="zellij:plugin-manager" session-manager location="zellij:session-manager" status-bar location="zellij:status-bar" diff --git a/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__bare_config_from_default_assets_to_string_with_comments.snap b/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__bare_config_from_default_assets_to_string_with_comments.snap index ecd6d37a68..71ade700a9 100644 --- a/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__bare_config_from_default_assets_to_string_with_comments.snap +++ b/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__bare_config_from_default_assets_to_string_with_comments.snap @@ -172,6 +172,12 @@ keybinds clear-defaults=true { bind "Alt p" { TogglePaneInGroup; } bind "Alt Shift p" { ToggleGroupMarking; } bind "Ctrl q" { Quit; } + bind "Super s" { + LaunchOrFocusPlugin "flock-selector" { + floating true + move_to_focused_tab true + } + } } shared_except "locked" "move" { bind "Ctrl h" { SwitchToMode "move"; } @@ -270,6 +276,12 @@ plugins { filepicker location="zellij:strider" { cwd "/" } + flock-selector location="zellij:flock-selector" { + cwd "/" + } + flock-sidebar location="zellij:flock-sidebar" { + cwd "/" + } plugin-manager location="zellij:plugin-manager" session-manager location="zellij:session-manager" status-bar location="zellij:status-bar" diff --git a/zellij-utils/src/setup.rs b/zellij-utils/src/setup.rs index 9a60b3ce40..2f1720ec69 100644 --- a/zellij-utils/src/setup.rs +++ b/zellij-utils/src/setup.rs @@ -847,6 +847,10 @@ mod setup_test { } #[test] fn cli_config_dir_finds_custom_default() { + // A user's own `layouts/default.kdl` is their startup layout. Flock's + // built-in `flock` fallback must not shadow it — that is the whole reason + // the fallback lives in layout resolution rather than in a shipped + // `default_layout` value. let config_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")) .join("src") .join("test-fixtures") @@ -868,6 +872,51 @@ mod setup_test { assert_eq!(layout_path, expected.display().to_string()); } + #[test] + fn no_user_default_layout_falls_back_to_the_flock_builtin() { + // The other half: a config dir with a layouts/ directory but no + // `default.kdl` gets Flock's built-in `flock` layout (sidebar docked), + // not upstream Zellij's plain `default`. + let config_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")) + .join("src") + .join("test-fixtures") + .join("config-dirs") + .join("no-default-layout"); + let cli_args = CliArgs { + config_dir: Some(config_dir.clone()), + ..Default::default() + }; + let (_, layout_info, _, _, _) = Setup::from_cli_args(&cli_args).unwrap(); + assert_eq!( + layout_info, + Some(LayoutInfo::BuiltIn("flock".to_owned())), + "with no user default.kdl, the flock builtin is the startup layout" + ); + } + + #[test] + fn explicit_default_layout_still_selects_the_upstream_builtin() { + // The escape hatch to plain Zellij chrome: naming `default` explicitly + // must reach upstream's builtin, not be redirected to flock. Uses a + // fixture with no `default.kdl`, so the builtin is what resolves. + let config_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")) + .join("src") + .join("test-fixtures") + .join("config-dirs") + .join("no-default-layout"); + let cli_args = CliArgs { + config_dir: Some(config_dir.clone()), + config: Some(config_dir.join("opt-out-config.kdl")), + ..Default::default() + }; + let (_, layout_info, _, _, _) = Setup::from_cli_args(&cli_args).unwrap(); + assert_eq!( + layout_info, + Some(LayoutInfo::BuiltIn("default".to_owned())), + "an explicit default_layout must not be redirected to flock" + ); + } + #[test] fn cli_with_relative_layout_and_extension() { // NOTE: We assume to be in `zellij-utils` root directory. If this doesn't hold, path diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments-2.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments-2.snap index abe93e4222..ad6097cc7c 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments-2.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments-2.snap @@ -4,6 +4,6 @@ expression: "format!(\"{:#?}\", layout_info)" --- Some( BuiltIn( - "default", + "flock", ), ) diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments.snap index 46db29e100..8522c0153b 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments.snap @@ -342,6 +342,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -888,6 +917,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -1448,6 +1506,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -2101,6 +2188,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -2610,6 +2726,35 @@ Config { input_mode: Normal, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -2997,6 +3142,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -3501,6 +3675,35 @@ Config { input_mode: Normal, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -3898,6 +4101,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -4278,6 +4510,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -4810,6 +5071,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -5313,6 +5603,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -5688,6 +6007,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -6279,6 +6627,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -6435,6 +6812,34 @@ Config { "/", ), }, + "flock-selector": RunPlugin { + _allow_exec_host_cmd: false, + location: Zellij( + PluginTag( + "flock-selector", + ), + ), + configuration: PluginUserConfiguration( + {}, + ), + initial_cwd: Some( + "/", + ), + }, + "flock-sidebar": RunPlugin { + _allow_exec_host_cmd: false, + location: Zellij( + PluginTag( + "flock-sidebar", + ), + ), + configuration: PluginUserConfiguration( + {}, + ), + initial_cwd: Some( + "/", + ), + }, "plugin-manager": RunPlugin { _allow_exec_host_cmd: false, location: Zellij( diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_env_vars_override_config_env_vars.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_env_vars_override_config_env_vars.snap index 6b6bdf8aec..6fbfca42e7 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_env_vars_override_config_env_vars.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_env_vars_override_config_env_vars.snap @@ -342,6 +342,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -888,6 +917,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -1448,6 +1506,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -2101,6 +2188,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -2610,6 +2726,35 @@ Config { input_mode: Normal, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -2997,6 +3142,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -3501,6 +3675,35 @@ Config { input_mode: Normal, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -3898,6 +4101,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -4278,6 +4510,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -4810,6 +5071,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -5313,6 +5603,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -5688,6 +6007,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -6279,6 +6627,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -6435,6 +6812,34 @@ Config { "/", ), }, + "flock-selector": RunPlugin { + _allow_exec_host_cmd: false, + location: Zellij( + PluginTag( + "flock-selector", + ), + ), + configuration: PluginUserConfiguration( + {}, + ), + initial_cwd: Some( + "/", + ), + }, + "flock-sidebar": RunPlugin { + _allow_exec_host_cmd: false, + location: Zellij( + PluginTag( + "flock-sidebar", + ), + ), + configuration: PluginUserConfiguration( + {}, + ), + initial_cwd: Some( + "/", + ), + }, "plugin-manager": RunPlugin { _allow_exec_host_cmd: false, location: Zellij( diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_keybinds_override_config_keybinds.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_keybinds_override_config_keybinds.snap index 2ca124a660..4232e3e290 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_keybinds_override_config_keybinds.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_keybinds_override_config_keybinds.snap @@ -193,6 +193,34 @@ Config { "/", ), }, + "flock-selector": RunPlugin { + _allow_exec_host_cmd: false, + location: Zellij( + PluginTag( + "flock-selector", + ), + ), + configuration: PluginUserConfiguration( + {}, + ), + initial_cwd: Some( + "/", + ), + }, + "flock-sidebar": RunPlugin { + _allow_exec_host_cmd: false, + location: Zellij( + PluginTag( + "flock-sidebar", + ), + ), + configuration: PluginUserConfiguration( + {}, + ), + initial_cwd: Some( + "/", + ), + }, "plugin-manager": RunPlugin { _allow_exec_host_cmd: false, location: Zellij( diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_themes_override_config_themes.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_themes_override_config_themes.snap index 139079ac80..0445c9899c 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_themes_override_config_themes.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_themes_override_config_themes.snap @@ -342,6 +342,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -888,6 +917,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -1448,6 +1506,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -2101,6 +2188,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -2610,6 +2726,35 @@ Config { input_mode: Normal, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -2997,6 +3142,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -3501,6 +3675,35 @@ Config { input_mode: Normal, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -3898,6 +4101,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -4278,6 +4510,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -4810,6 +5071,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -5313,6 +5603,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -5688,6 +6007,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -6279,6 +6627,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -8206,6 +8583,34 @@ Config { "/", ), }, + "flock-selector": RunPlugin { + _allow_exec_host_cmd: false, + location: Zellij( + PluginTag( + "flock-selector", + ), + ), + configuration: PluginUserConfiguration( + {}, + ), + initial_cwd: Some( + "/", + ), + }, + "flock-sidebar": RunPlugin { + _allow_exec_host_cmd: false, + location: Zellij( + PluginTag( + "flock-sidebar", + ), + ), + configuration: PluginUserConfiguration( + {}, + ), + initial_cwd: Some( + "/", + ), + }, "plugin-manager": RunPlugin { _allow_exec_host_cmd: false, location: Zellij( diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_ui_config_overrides_config_ui_config.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_ui_config_overrides_config_ui_config.snap index c527d5e553..1d87116331 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_ui_config_overrides_config_ui_config.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_ui_config_overrides_config_ui_config.snap @@ -342,6 +342,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -888,6 +917,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -1448,6 +1506,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -2101,6 +2188,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -2610,6 +2726,35 @@ Config { input_mode: Normal, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -2997,6 +3142,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -3501,6 +3675,35 @@ Config { input_mode: Normal, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -3898,6 +4101,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -4278,6 +4510,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -4810,6 +5071,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -5313,6 +5603,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -5688,6 +6007,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -6279,6 +6627,35 @@ Config { input_mode: Scroll, }, ], + KeyWithModifier { + bare_key: Char( + 's', + ), + key_modifiers: { + Super, + }, + }: [ + LaunchOrFocusPlugin { + plugin: Alias( + PluginAlias { + name: "flock-selector", + configuration: Some( + PluginUserConfiguration( + {}, + ), + ), + initial_cwd: None, + run_plugin: None, + }, + ), + should_float: true, + move_to_focused_tab: true, + should_open_in_place: false, + close_replaced_pane: false, + skip_cache: false, + tab_id: None, + }, + ], KeyWithModifier { bare_key: Char( 't', @@ -6435,6 +6812,34 @@ Config { "/", ), }, + "flock-selector": RunPlugin { + _allow_exec_host_cmd: false, + location: Zellij( + PluginTag( + "flock-selector", + ), + ), + configuration: PluginUserConfiguration( + {}, + ), + initial_cwd: Some( + "/", + ), + }, + "flock-sidebar": RunPlugin { + _allow_exec_host_cmd: false, + location: Zellij( + PluginTag( + "flock-sidebar", + ), + ), + configuration: PluginUserConfiguration( + {}, + ), + initial_cwd: Some( + "/", + ), + }, "plugin-manager": RunPlugin { _allow_exec_host_cmd: false, location: Zellij( diff --git a/zellij-utils/src/test-fixtures/config-dirs/no-default-layout/layouts/unrelated.kdl b/zellij-utils/src/test-fixtures/config-dirs/no-default-layout/layouts/unrelated.kdl new file mode 100644 index 0000000000..27d66d150c --- /dev/null +++ b/zellij-utils/src/test-fixtures/config-dirs/no-default-layout/layouts/unrelated.kdl @@ -0,0 +1,4 @@ +// Present only so the layouts dir exists; deliberately not named default.kdl. +layout { + pane +} diff --git a/zellij-utils/src/test-fixtures/config-dirs/no-default-layout/opt-out-config.kdl b/zellij-utils/src/test-fixtures/config-dirs/no-default-layout/opt-out-config.kdl new file mode 100644 index 0000000000..3bb849fba5 --- /dev/null +++ b/zellij-utils/src/test-fixtures/config-dirs/no-default-layout/opt-out-config.kdl @@ -0,0 +1,2 @@ +// Naming the upstream builtin explicitly, to opt out of Flock's sidebar chrome. +default_layout "default"