aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/kdl/mod.rs (follow)
Commit message (Collapse)AuthorAge
* sl0p: --purpose flag and tab-level purposeuser2026-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Completes the two pieces deferred from the first workspace-hints pass. `zellij run --purpose X` / `zellij action new-pane --purpose X` tag a pane at spawn time, which is what an agent wants for panes it creates itself; the OSC wrapper still works for programs that declare their own role. Not supported with --in-place, which replaces another pane rather than being a pane of its own: clap rejects the combination rather than accepting a flag that would do nothing. `tab name="work" purpose="agent-work"` gives a whole tab a role, reported by `list-tabs --json`. It rides the tab's ROOT layout node, reusing the pane field because a tab's root is the tab container and never itself a pane -- asserted by a test for the tightest case (a tab holding exactly one pane), since a leak there would silently mislabel a pane. The interesting part is why the flag first shipped broken. There are TWO protobuf boundaries -- the plugin API and the client->server IPC contract -- and a CLI flag must cross the second one. Defaulting the field in the conversion (what "no protoc" usually forces) compiles cleanly and then silently drops the value in transit, so --purpose parsed, printed a pane id, and did nothing. Fixed by adding the field to both contracts by hand, in the .proto AND the committed generated prost, kept in lockstep so a future regeneration reproduces it: protoc is only needed to regenerate, not to build. Both boundaries now have a round-trip test, and the IPC one was confirmed to fail when the wire read is removed. Sanitising moved to Grid::set_authoritative_purpose, the single choke point every out-of-band source passes through, after the CLI path was observed delivering `bad purpose; rm -rf /` intact into list-panes --json.
* sl0p: add an indexed style for status bar buttonsuser2026-08-12
| | | | | | | | | | | | | | | | | | | | | `status_bar_button_style "indexed"` renders `1:Approve 2:Reject` instead of `[Approve] [Reject]`, so the bar doubles as a key legend for a harness that binds alt+1..9 to the same actions. A config option rather than a protocol field: whether the numbers mean anything depends on what the USER has bound, not on what the program knows. It needs no wire change and so no version bump, and the click report still carries the id -- never the index -- so a program is unaffected by which style is in force. The style is threaded into layout_status_bar, the one function the renderer draws from and the hit-test resolves against. That is what makes this safe: changing a button's rendered width necessarily changes its clickable span too, verified by a test asserting span width equals the drawn width and that every drawn column resolves back, for both styles. Also fixes the web client's Style construction to read the option from config rather than defaulting it -- my first pass claimed that code had no pane_frames config available, which was wrong; it uses it two lines further down.
* sl0p: separate the hover resize hint from the hover highlightuser2026-08-12
| | | | | | | | | | | | | | | | | | Upstream's mouse_hover_effects governs two unrelated things: the frame highlight on hover, and the "Ctrl <MouseScroll> or <drag borders> to resize" hint. Its own comment in default.kdl admits as much. So silencing a beginner reminder you have outgrown also costs you a highlight that stays useful indefinitely. mouse_hover_help_text (default true) gates only the hint. One line in execute_send_to_terminal; the highlight is set in execute_update_hover and is untouched. Config-file only, deliberately. The option has no protobuf slot, so it does not cross the client/server IPC contract -- the roundtrip test asserts exactly that, with the fixture set to None and a comment explaining why. It still works from the config file because the server parses the file itself and Options::merge keeps the file value when the client sends None; a CLI flag would be silently ignored.
* sl0p: add close_if_focused to LaunchOrFocusPluginuser2026-08-12
| | | | | | | | | | | | | | | | | | | | | | | Upstream's action focuses an already-running plugin, so a chord bound to it can only ever open one -- there is no way to dismiss with the same key. This cannot be fixed in a plugin. Keybindings are resolved into actions in route.rs before a key reaches a pane, so the launching chord never arrives at the plugin. intercept_key_presses does not help either: the intercept lives in screen.rs and only sees keys that already became Action::Write, i.e. keys destined for a pane. Confirmed empirically -- an intercepting build received Ctrl-u but never Ctrl-;. Closes only when the plugin is the focused pane in the client's ACTIVE tab, so the chord cannot close whatever pane the user happens to be on. A plugin that exists but is hidden behind a floating-layer toggle, or is focused in a different tab, is revealed or brought over as before. Defaults to false, so every existing binding is unaffected. Config-only, with no protobuf representation: defaulted at both boundaries and dropped when an action crosses the plugin API, so no prost regeneration is needed. The 24 snapshot lines are the new field appearing in serialised keybind dumps.
* sl0p: add a minimal style for the stacked-pane pickeruser2026-08-11
| | | | | | | | | | | | | | | | | | | | | The boxed entries read as clutter: every entry bracketed in vertical bars, and the active one marked by a "> " that sits outside its own cell. `stack_list_style "minimal"` drops both. The active entry is shown by inverting it instead, which needs no glyph and no column, and the padding is moved inside the styled run so the inverted block covers the whole cell rather than leaving unstyled gaps at its edges. Four fewer columns of decoration per entry, so more fit per row in grid mode. Uses ribbon_selected rather than text_selected. Themes give ribbon_selected real contrast because it marks the selected item elsewhere in zellij's UI -- gruber yellow here, white-on-blue in the TempleOS theme -- whereas text_selected's background is 40,40,40 against a 24,24,24 terminal and read as essentially no highlight when tried. Decoration width comes from the style itself, so Tab's column arithmetic and the renderer cannot disagree about how wide an entry is. Default stays boxed, so nothing changes for anyone who does not ask.
* sl0p: optionally render the stacked-pane picker as a griduser2026-08-11
| | | | | | | | | | | | | | | | | | | | | | | `stack_list_layout "grid"` packs picker entries several per row, which turns stack_list_max_rows from a count into a space budget: eight panes in a wide terminal now fit on one row instead of spending three and hiding five. The entry renderer already drew each entry as a single chunk at its own x/y, sized by its geom and centring its own label, so a grid needed no rendering changes at all -- only the loop assigning every entry the same x and the full width. Column count is derived from the widest label rather than configured, so it adapts to the titles; one column is the floor and reproduces the previous full-width rows byte for byte. The row -> member mapping now has a column axis, and it had already caused one wrong-pane bug when two consumers disagreed. So the layout is computed once, by one function, into explicit cells; the renderer, the reserved-row budget and the mouse hit-test all read those same cells rather than each doing their own arithmetic. Windowing is by row, so a grid scrolls a whole row at a time and degrades to the old per-member window when there is one column. Cells are separated by a two-column gap: without it the focused entry's "> " marker sits flush against the previous cell and reads as belonging to it.
* sl0p: cap how many rows the stacked-pane picker takesuser2026-08-11
| | | | | | | | | | | | | | | | | | | | | | | A stack reserves one row per member plus a padding row, so a deep stack spends most of the screen listing itself. `stack_list_max_rows` caps that; the list windows around the focused member and reports the rest as "+N more". The indicator goes in the padding row the list already reserves, so it costs no extra row and never displaces a real entry. Entries keep their real rank rather than renumbering from 1, otherwise the numbering stops meaning anything once the window has scrolled. The window slides on ordinary focus movement, which is also why this needs no new keybinding -- Action is a protobuf enum and the prost assets cannot be regenerated here (no protoc). A fixed cap rather than hover-to-expand on purpose: reserved_top_rows feeds pane geometry, so growing the list on hover would resize the pane's PTY and reflow whatever is running in it on every mouse move. A real expand/collapse has to be an overlay that reserves nothing, which is a much larger change to the render path. reserved_top_rows and the renderer both go through stack_list_window(); if they disagreed the list would draw into rows the geometry never reserved, i.e. over the pane beneath it.
* sl0p: collapse to a swap layout when the terminal gets narrowuser2026-08-11
| | | | | | | | | | | | | | | | | | | | | | | | Splitting a window into thirds is great until the window is 70 columns wide and each pane gets 23. `responsive_min_cols` collapses the tab into the swap layout named by `responsive_layout` when it gets narrower than that, and restores the previously active layout when it grows back. Selects a swap layout BY NAME rather than adding a size-aware LayoutConstraint: that type crosses both the plugin protobuf API and the client/server contract, and the committed prost assets cannot be regenerated here (no protoc). Restoring uses a 10-column hysteresis band. Without a dead band, dragging a window edge that lands exactly on the threshold flips the layout on every motion event, and every flip resizes every PTY in the tab. "Did the user rearrange panes by hand" is judged from the damaged flag as sampled BEFORE each resize, not the live one: resize_whole_tab's own auto-layout pass sets that flag itself and clears it again only if it found a layout that fits, so on a terminal too narrow for any of them it latches true although nothing was rearranged. And once collapsed, restore stays reachable regardless of the flag, so damage occurring while collapsed cannot strand the tab in the narrow layout.
* sl0p: optionally hide the 'Pane #N' placeholder titleuser2026-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | `ui { pane_frames { hide_default_pane_names true } }`, default false. A pane now shows no title at all until something actually names it: the user renaming it (including by double-clicking the title row) or the running program setting a title. Upstream always shows an auto-generated 'Pane #N'. Implemented by tracking whether pane_title is still the constructor's placeholder, NOT by matching the string: a program that legitimately titles itself 'Pane #3' must not be mistaken for an unnamed pane. set_title clears the flag, since something then chose that title. current_title reads the option at render time rather than baking an empty title in at construction, so it hot-reloads and turning the option back off restores the placeholder on existing panes. Display precedence is unchanged and now explicit in the code: user-given name > title set by the running program > placeholder render_terminal_title already fell back to an empty string rather than the placeholder, so the terminal WINDOW title is unaffected. Empty titles were already handled by the frame renderer (render_title_left_side returns None for an empty title), including the sl0p centred/right alignment path. Baselines held: zellij-server 1436/30, zellij-utils 436/5.
* sl0p: grayscale the contents of unfocused panesuser2026-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `ui { pane_frames { inactive_grayscale 0-100 } }`, default 0 (off). Real colour transformation, not the SGR 'faint' attribute zellij already uses for frames: faint is terminal-dependent, several terminals only apply it to the 16 ANSI colours, and it does not remove colour. Each cell's colour is resolved to RGB and blended toward its own Rec.709 luminance, so an unfocused pane keeps its brightness but drains of colour. Colour resolution covers the cases that actually occur: RgbCode directly, ColorIndex via eightbit_to_rgb, and NamedColor by mapping to its 0-15 index. Cells with NO explicit colour are deliberately left alone - they render in the terminal default, which is already unsaturated, and rewriting them would mean emitting an explicit colour for nearly every cell for no visible gain. Two non-obvious pieces were needed to make it actually work: - The output buffer only emits CHANGED cells, so an idle pane would keep its old colours indefinitely after losing focus. Pane::refresh_for_focus_change forces a full repaint, called from ActivePanes::insert (the single place focus changes). It is a no-op when the feature is off, so it costs nothing by default. - Terminal panes render through the SHARED multi-client path. Focus is per client, so once unfocused panes are desaturated two clients may need different output for the same pane. Both tiled and floating panes now fall back to per-client rendering when grayscale is enabled - the reason this is opt-in. Known limitation: sixel/kitty image chunks are not colour-transformed and stay in colour. Hot-reloads like the other sl0p options. Tests cover the transform: full strength yields a true neutral grey, partial sits between original and grey, indexed and named colours resolve rather than being skipped, luminance is perceptual (green brighter than blue) not a flat average, already-grey is unchanged, and non-colour codes are untouched. Baselines held: zellij-server 1436/30, zellij-utils 436/5.
* sl0p: CSS-style 1/2/4-value shorthand for inner paddinguser2026-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | `padding` now accepts: padding 1 -> all four sides padding 1 2 -> up/down = 1, left/right = 2 padding 1 2 3 4 -> up=1 down=2 left=3 right=4 NOTE the 4-value order is UP DOWN LEFT RIGHT as requested, deliberately NOT CSS's clockwise top-right-bottom-left. Documented on PanePadding and at the parser, since the similarity to CSS invites the wrong assumption. 3 or 5 values are rejected with a message naming the accepted forms, rather than being silently reinterpreted. Negative values clamp to 0. ASPECT: only the 1-value form is aspect-corrected (left/right multiplied by gap_aspect) so `padding 1` looks square on a non-square cell grid. The 2- and 4-value forms are literal: specifying axes separately means the caller is already controlling horizontal size, and silently doubling it would surprise. Style now carries a PanePadding {top,bottom,left,right} instead of an x/y pair, which also collapses the reconfigure plumbing back to a single field rather than growing another parameter per side. to_kdl always emits the explicit 4-value form: emitting the 1-value form would re-apply gap_aspect on the next read and silently double the padding on every config round-trip. Baselines held: zellij-utils 435/5, zellij-server 1421/30.
* sl0p: uniform pane gap + aspect-corrected horizontal gapuser2026-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two changes to how the gap is defined. 1. UNIFORM GAP. Previously every pane inset every side by `gap`, so two neighbours each gave up a cell and the space between them was 2*gap while the screen edge got only gap. Now a pane insets RIGHT and BOTTOM always, and LEFT/TOP only where that edge is the viewport boundary. Two neighbours contribute exactly one gap between them, and the outer screen edges get the same gap. `gap 1` now means 1 everywhere. The per-side offset is computed in tiled_panes, which is the layer that knows the viewport, and pushed to panes via Pane::set_gap_offset before the content-offset sweep. Floating panes keep a zero gap: they are positioned explicitly by the user, so an inter-pane gap does not apply to them (they still get padding). 2. ASPECT CORRECTION. Terminal cells are roughly twice as tall as they are wide, so an equal number of rows and columns does not look like an equal distance. `gap` and `padding` are now expressed in ROWS, and columns are multiplied by `gap_aspect` (default 2, minimum 1). Style carries the resolved pane_gap_x/y and pane_padding_x/y. FrameConfig::Default is now hand-written rather than derived: gap_aspect must default to 2 to match the KDL parser, otherwise a parsed config disagrees with a default-constructed one and it surfaces as config round-trip diffs (this broke can_define_ui_configuration_in_configfile and both bare_config_from_default_assets_to_string tests). Tests assert the actual invariants: stacked and side-by-side neighbours get exactly one gap between them, screen edges get the same gap as between panes, and inset_by refuses to collapse a pane too small to survive it. Baselines held: zellij-server 1421/30, zellij-utils 433/5.
* sl0p: configurable pane gap (outer) and padding (inner)user2026-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds `ui { pane_frames { gap N; padding N } }`, both defaulting to 0 so stock configs are unaffected. gap - cells each pane gives up on every side, leaving real empty terminal between neighbouring panes (WM-style outer gaps). Two adjacent panes therefore show 2*gap between them. padding - cells between a pane's frame and its content; breathing room inside the pane without moving the frame. Design: the pane KEEPS its allocated PaneGeom. Only two things move: 1. the drawn frame, via Viewport::inset(gap), reusing the existing frame_geom_override mechanism already used for stacked panes; 2. the content, via Offset::expanded_by(gap + padding) inside set_content_offset. Because the allocation is untouched, the kasuari resize solver and mouse hit-testing need no changes at all, and a click landing in a gap still resolves to the owning pane. Content position, size and cursor are all derived from content_offset, so widening it in one place keeps every consumer consistent. Viewport::inset refuses to shrink a pane below a frame's minimum viable extent (two borders + one content cell) rather than emitting a degenerate or zero-sized frame. Negative KDL values clamp to 0 instead of wrapping. Tests cover: inset identity/shrink/recentre, the containment invariant (an inset frame never escapes its allocation), small-pane refusal, and the key safety property that content inset by gap+border+padding lands strictly inside the frame drawn at inset(gap).
* sl0p: configurable pane title alignmentuser2026-08-08
| | | | | | | | | | | | | | | | | | | | | | | Adds `ui { pane_frames { title_alignment "left"|"center"|"right" } }`. Full-frame panes previously hardcoded the title flush left, while frameless panes (pane_frame_style "titles") already centered it via compose_bracketed_title. This brings full frames up to parity and makes the position configurable. Implementation notes: - The value rides on `Style`, which is already threaded to FrameParams, so no new plumbing through Tab/PaneContentsAndUi was needed. - It is deliberately NOT round-tripped over the plugin protobuf boundary: plugins have no use for frame title alignment and adding a proto field would force regenerating the committed prost assets in assets/prost/. - Left keeps the original code path untouched, so default configs render exactly as before. - The geometry loop clamps the title start against the right-side indicators and breaks on `>=` rather than `==`, so a mis-clamped segment cannot spin. Tests: alignment ordering, frame width preservation across widths, and narrow-pane safety (cols 1..24 must not panic or corrupt width).
* Support the Kitty Image Protocol (#5428)Aram Drevekenin2026-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * initial implementation - kinda working * tests and fixes * fix bounds * tests and compatibility fixes * fix: cursor scroll, clears, deletes, key tolerance, and host id range * fix: keep images alive across resize, relayout and history scroll * anchor to lines, not pixels * fix image/text alignments * config to allow disabling * fix pinned pane issue * never let host graphics replies reach the keyboard parser * fix nested session * properly handle fullscreening a pane * rustfmt * cleanup of ignored test * add pr
* Nested session handling (#5417)Aram Drevekenin2026-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix: theme query and updated pixel dimensions * add no-ui-fullscreen key/action/capability * protocol core * integration test harness * fix integration tests * fix flaky tests * nested ui (dimming) and directional focus initial implementation * integration tests for nested ui dimming and directional focus * initial full screen nesteed implementation * fix: keep hidden floating panes hidden across nested no-ui fullscreen * fix integration tests * no ui fullscreen integration tests * hardening behavior/tests * fix(nested): re-derive descend/dim on host tab switch and new-tab so clicking dimmed chrome ascends * initial modal implementation * initial ui improvements * fix integration tests * improve nested selection ui * nested session modal refactoring and tests * improve integration test speed somewhat * some ui adjustments * simplify full/auto nested session handling * hints in compact-bar * guest stdin leak fix * allow floating panes to be fullscreen * make nested session handling configurable * protocol reannounce * refactor: naming confusion * improve ux somewhat * rustfmt * merge fixes * improve integration test rate limiting (fix ci) * add pr
* feat(config): add mouse_scroll_resize option (#5283)WeZZard2026-07-17
|
* fix(config): allow binding theme actions in config.kdl (#5302)Truffle2026-07-10
| | | | | | | | | | | | | | | | | | | | | | | * fix(config): allow binding theme actions in config.kdl ToggleTheme, SetDarkTheme and SetLightTheme work from the CLI (`zellij action toggle-theme`) but the keybinding parser rejected them with "Unsupported action", so they could not be bound in config.kdl. The inner `parse_kdl_action_arguments!` macro already knew these actions, but the main `match action_name` arm that dispatches to it had no entry for them, so they fell through to the unsupported-action error. Add the missing parse arms, and the matching `to_kdl` serialization arms so the bindings round-trip. Closes #5297 * add actions to round trip tests * add pr --------- Co-authored-by: Aram Drevekenin <aram@poor.dev>
* Allow creating panes/tabs from the CLI without changing focus to them (#5346)Aram Drevekenin2026-07-09
| | | | | | | | | | | * feat: allow opening panes and tabs from the cli without focusing them * rustfmt * fix flake * rustfmt * add pr
* Stacked lists (#5331)Aram Drevekenin2026-07-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * initial implementation * improve ui * fix: stacked resize interaction * title list boundaries fix * fix BEL * mouse parity * float/embed + bulk-op features * fix in-place bug * improve ui * config live reload * improve ui * fix issues, add exit status * fix for serialization * fix tests * integration tests * comments * refactor: duplicate title logic * refactor: consolidate logic * fix: flaky tests * add a stacked swap layout * rustfmt * fix e2e * add pr
* Title frames (#5318)Aram Drevekenin2026-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * initial implementation * improve single line title design * hint text plugin infra * add proto regen task * display alt text in status bar * don't display text with full frames * style alt hover text * fix + style control own pane hover * make multiplayer indications responsive * update snapshots * plugin api * single pane as tab * better scroll styling * fix tests * tab-bar plus hover * plugin surface tests * integration tests * adjust all integration tests * reduce hover noise * add pane id to in place * more integration tests * style: rustfmt * update plugin assets * update assets and snapshots * add pr
* feat(panes): `FocusLastPane` action (#4241)DawidPietrykowski2026-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat(panes): focus last pane (#4142) * add tests * add client id parameter to `add_floating_pane` * add action for floating panes * add tests for floating panes * add keybinds to configs * rebase fixes * simplify focus logic when adding stacked pane * formatting fix * formatting fix 2 * fix: make sure expanding pane always focuses it for all clients in stack * add pr * fix rebase --------- Co-authored-by: Aram Drevekenin <aram@poor.dev>
* Mobile layout (#5241)Aram Drevekenin2026-06-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * phase 2+3 * initial mobile plugin (phases 4 + 5 + 6) * some bugfixes * implement stage 7 * mobile interface improvements * improve mobile pane/tab picker * more ui improvements and fixes * various mobile fixes * some mobile fixes * mobile keyboard triggering fix * some cleanups * initial plugin keyboard implementation * improve keyboard hit zones * improve keyboard * pinch resize * pinching fixes * implement scrolling + panning * initial keyboard resizing * fix: mobile first render issues * keyboard responsiveness * fix some issues with the keyboard * implement fit * fix mobile scrolling * add tilde cell to compact * improve mobile keyboard * fix starting mobile terminal font to natural keyboard size * fix mobile resize blank screen flash * shadow focus for mobile * more keyboard fixes * improve mobile status bar * fix: render plugins to mobile clients * allow opening new panes/tabs from the mobile plugin * allow configuring * fix dot slash * improve mobile native soft keyboard interaction * switch to native keyboard - initial implementation * dirty hacks, but phone keyboard works now * adjust keyboard help strip * fix cursor in mobile * fix keyboard and help line * rename keyboard to modifier bar * allow starting new session * make clicking session name bring us to new session menu * allow switching to desktop from the mobile ui * mobile welcome screen initial implementation * mobile welcome screen fixes * various welcome screen fixes * more mobile fixes * moar mobile fixes * mobile ui redesign * fix: swallowed backspace bug * switch session screen improvement * touch up some interfaces * refactor: move mobile state to own struct * refactor: move fit resizing to the server * remove dead flash code * some cleanups * refactor: clear fit on close * refactor: improve fit api * refactor: pane sync functions * refactor: mouse * refactor: break into modules * some cleanups for the sessions screen * fix scrolling and other stuff * refactor: sessions screen * refactor: panes screen * refactor: new session screen * refactor: menu screen * refactor: render * cleanups * refactor: plugin structure * remove unused welcome screen path * Rename api * refactor input.js * cleanup useless comments * fit/mobile refactoring * take out the garbage * remove more comments * remove mobile flash on startup/attach * fix: various mobile startup issues * fix space bugs * cleanup * rustfmt * fix windows build * adjust modifier bar ui * add pr
* Support CSI2031 (dark/light theme switching) + remove STDIN cache to avoid ↵Aram Drevekenin2026-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | stale color queries (#5105) * initial phase 1 implementation * various fies * some fixes * fix fragmented stdin cases * some fixes * renaming * guard against old clients * implement csi 2031 * allow toggling theme with actions * rustfmt * fix: finalize trailing characters in ansi parser as well * add pr
* Layout string flag (#4956)Aram Drevekenin2026-03-30
| | | | | | | | | * allow sending a stringified layout with --layout-string * add --tab-id to all the things * fix windows tests * add pr
* Warning and duplication cleanups (#4857)Aram Drevekenin2026-03-16
| | | | | * cleanup compilation warnings * consolidate EditScrollbackRaw into EditScrollback
* Ansi dump support (#4848)Aram Drevekenin2026-03-14
| | | | | | | | | | | | | | | | | | | | | * add missing pane-id and tab-id arguments to all cli actions * rustfmt * dump-screen --ansi * edit-scrollback --ansi * add --ansi to subscribe * add tests for ansi additions * add ansi render report to plugins * rustfmt * fix e2e tests * add pr
* Focus follows mouse and mouse clickthrough (#4836)Aram Drevekenin2026-03-11
| | | | | | | | | * implement focus follows mouse * mouse click through * rustfmt * add pr
* allow dumping screen to STDOUT as well (#4823)Aram Drevekenin2026-03-09
|
* feat(cli): add --pane-id option to dump-screen action (#4598)Yacine Hmito2026-03-09
| | | | | | | | | | | | | | | | | * feat(cli): add --pane-id option to dump-screen action Adds the ability to dump a specific terminal pane's content by passing `--pane-id <ID>` to the `dump-screen` CLI action. When omitted, the existing behavior of dumping the focused pane is preserved. This enables coding agents running inside Zellij to inspect the content of other panes programmatically, without needing complex workarounds. Prior art: https://github.com/theslyprofessor/zellij-pane-tracker, whose design complexity is due to current limitations that this PR addresses. * address review * improve man page entry
* Single screen session manager (#4821)Aram Drevekenin2026-03-09
| | | | | | | | | | | | | | | | | | | | | | | * initial implementation * adjust ui * preserve selection * width responsiveness * behavior fixes * fix: do not count suppressed panes * ui improvements * multi-screen config and prompt hint * tests + refactoring * improve performance * add pr
* feat: add per-pane default foreground/background color support (#4737)Karl Bunch2026-03-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: add per-pane default foreground/background color support Add per-pane default foreground and background colors, configurable through four surfaces: - OSC 10/11 escape sequences (set/query) and OSC 110/111 (reset) - CLI action: zellij action set-pane-color --pane-id <id> --fg/--bg - Layout config: default_fg/default_bg properties on pane nodes - Plugin API: set_pane_color() SDK function and PaneInfo read-side Colors are applied at render time as a fallback when cells have no explicit foreground/background, without mutating stored grid data. Closes #4712 * refactor: address review feedback for pane color support - Extract adjust_styles_for_custom_bg_fg in output/mod.rs - Move color parsing (xparse_color) from tab into Grid - Move color serialization (ansi_code_to_color_string) into Grid - Pane trait now uses Option<String> for color getters/setters - Add colors to session serialization (dump-layout) - Add default_fg/default_bg to protobuf IPC schema to fix layout-in-session color loss - Update example layout with tab-bar and status-bar * fix stack overflow and ordering * rustfmt * update e2e snapshots --------- Co-authored-by: Karl Bunch <karl@karlbunch.com> Co-authored-by: Aram Drevekenin <aram@poor.dev>
* Visual indication for terminal bells (#4781)Aram Drevekenin2026-03-03
| | | | | | | | | | | | | * initial implementation * rustfmt * allow disabling with config * add missing kdl * add pr * fix tests
* Atomic show hide floating panes (#4764)Aram Drevekenin2026-02-25
| | | | | | | * atomic show/hide floating panes (cli, plugin API, keybinding) * rustfmt * add pr
* Allow closing replaced panes when opening panes in place (#4760)Aram Drevekenin2026-02-24
| | | | | | | * allow close_replaced_pane from keybind and cli * rustfmt * add pr
* Purge `async_std` from the codebase (#4672)har7an2026-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * build(utils): Replace `async_std` with `tokio` removing an entire async runtime from the dependency tree. `tokio` has previously been required by `wasmtime` in any case, and the version of async_std we used was ancient (1.3) and relied on unstable features. * build(server): Remove `async_std` from the codebase and replace it with `tokio` instead, which is already used by `zellij-utils` and `wasmtime`. * build(server): Remove dead dependency. * fix: Don't keep an async runtime in the `zellij-utils` subcrate but prefer to reuse an existing runtime from a caller instead. If no such runtime exists, create an ephemeral runtime on the current thread to run async tasks instead. Ideally, the functions needing the async task would be async themselves, but these are called by the `Layout` code based on a `ClientMsg`, and the code handling this currently lives in `zellij-utils` and is sync itself. So, for the time being, there is no way around this runtime requirement without a huge refactoring. * refactor(server): Unclutter async tasks in a few cases where either blocking code was called in an (unnecessary) async task or an entire thread was spawned to block on the result of an async task. * docs(CHANGELOG): Mention PR 4672 * fix(server): Don't terminate when killing a panes children fails but log the error and continue instead. * feat: Add config option for number of async tasks to spawn so users on machines with few resources can configure a task limit without requiring recompilation.
* Add optional support for raw scrollback with ansi (#4617)Luis Enrique Muñoz Martín2026-02-18
| | | | | | | | | | | | | | | * scrollback with ansi support * add command to kdl parser * removed an unused esc (actually could cause some visualization issue) * correctly reset style after new lines * remove redundant reset * preserve styled spaces * more readable code
* refactor: make tab_ids stable (#4685)Aram Drevekenin2026-02-06
| | | | | | | | | | | * refactor: clear distinction between tab_id and tab_position * add tab_id to TabInfo * add test * rustfmt * add pr
* Allow resizing panes with the mouse (#4678)Aram Drevekenin2026-02-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * initial implementation * improve edge detection * fix up/down resize increment bug * temporarily disable alt-mouse grouping * fix inverting strategies and simplify edge detection * resize of floating -> ctrl click, resize of tiled -> (ctrl)click * fix old functionality and tests * refactor and fixes * refactor mouse click handling * move mouse click handling to separate module * resize scroll up/down with scroll wheel * tests for scroll resize * implement hover help * fix occlusion bug * allow disabling with config * fix focus pinned pane on frame * use strategy invert resize directly rather than function parameter * remove annoying log message * cleanups and formatting * add pr
* Allow disabling OSC8 link generation (#4624)Aram Drevekenin2026-01-22
| | | | | | | * implementation * rustfmt * add pr
* Fix tiled new pane borderless (#4618)Aram Drevekenin2026-01-20
| | | | | | | | | * allow opening tiled pane as borderless * rustfmt * add pr * fix e2e tests
* Allow toggling pane frames for specific panes (#4615)Aram Drevekenin2026-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | * initial implementation * add borderless to edit and plugin cli commands * allow changing existing pane to borderless * allow setting in layouts and keybindings * get to work through the existing plugin api commands * fix when applying (swap) layouts * fix tests * allow setting pane as bordered (borderful?) when changing its coordinates (eg. through the cli) * allow explicitly setting a pane as bordered or borderless without toggling * rustfmt * adjust snapshots * docs(changelog): add PR
* Fix: allow 0% coordinate specification for floating panes (#4609)Aram Drevekenin2026-01-15
| | | | | | | * fix: allow 0% when specifying x/y coordinates but not when specifying width/height * rustfmt * add pr
* Layout manager (#4601)Aram Drevekenin2026-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ad plugin override_layout command * watch available layouts and report to plugin thread * Event::AvailableLayoutInfo * save layout command * refactor save_layout * fix api and permissions * delete_layout API command * edit layout in place API * edit layout response through api * propagate layout parsing errors * generate random name plugin api * dump stringified layout API * synchronicity dump_session_layout and include LayoutMetadata in sync response * parse_layout plugin api * fix: default to default layout dir in plugin api * rename_layout plugin command API * initial implementation of multi-tab override * apply to multiple tabs * allow applying to only the active tab * add tab/pane names to layout parsing metadata * indicate is_builtin_plugin in PaneMetadata * get_layout_dir plugin API command * consolidate (and fix) is_builtin_plugin logic * fix bad ret * allow dumping the layout for just a specific tab in the session * get focused pane and tab sync api * color last substring variants * add plugin * update assets * fix tests * add e2e tests for new plugin apis * update ui with new shortcut * rustfmt * docs(changelog): add PR
* Feature: allow overriding a layout for a currently running tab (change ↵Aram Drevekenin2025-12-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | layout at runtime) (#4566) * add tests for LayoutApplier * initial untested implementation of override functions * add override-layout cli action with stub in screen * filter run instructions to ignore * implement override-layout roundtrip through plugin and pty threads * initial full-cycle working override implementation * fix some bugs (eg. actually start new terminals) * fix some bugs with focus after override * fix floating pane matching bug in layout applier * formatting * use first tab, error on more than 1 tab * fix some floating_panes ordering and shell issues * get new tab name to work * respect swap layouts * allow specifying tab properties on main layout node if we just have one tab * add tests for new override methods * start work on retaining panes, hard-coded things, kind of working but broken in many places * fixed most tiled pane override bugs * reset viewport before reapplying * revert constraint system changes * retain-existing-terminal-panes flag * add retain terminal panes tests * add retain plugin panes flag * add keybind * add retain plugin panes tests * add override-layout e2e test * refactor: layout_applier * style: rustfmt * some cleanups * fix cli flags * no crashy * formatting and artifacts * moar cleanups * fix: respect expanded in stack when overriding * docs(changelog): add PR
* Command Sequences, Blocking CLI Commands, New Plugin APIs (#4546)Aram Drevekenin2025-12-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix deadlocks * initial logging to plugin implementation * only log actions, include keys as Action::Write * send actions to plugins as a new Event::UserAction * add Action::Write metadata to plugin API * run_action plugin command and permission * block-until-exit/success/failure in the cli * fix tests * add NewBlockingPane to the plugin API * run actions in a different thread so as not to block plugin execution * add custom context to run_action flow * fixes for floating pane z_index sorting and unknown protobuf events not crashing plugins * always render the frame of pinned panes * macros module * add macros to config * KDL macro parsing * thread macros to the plugin thread * get/update/delete macros from plugins * add macros updated event * add ability to rename macros * fix deadlock * fix z_indices with pinned unselectable panes bug * allow plugins to opt-in to show_cursor * change show_cursor(bool) to show_cursor(Option<coordinates>) * test * upgrade strum to allow proper enum iteration and case insensitive fromstr implementation for Actions * better cwd tracking for exited command panes * add initial panes to NewTab Action (no-op for now) * add initial panes to cli newtab action * make initial panes work * add close_on_exit and start_suspended to the cli * properly convert newtab action (potentially breaking for plugins) * allow first pane in tab to block * make distinction between opening panes with the last active client and the current pane in the cli * improve some apis * fix fixed size closing pane bug * fix plugin cursor coordinates * fix issues with launch-or-focus-plugin having to do with in-place and suppressed panes * fix: set affected pane in replace pane * allow setting a pane in place when it is suppressed and being focused (tests failing) * fix tests * some fixes for unsuppression of panes * some fixes for completion_tx in new tab action * allow replace/suppressed rather than replace/close only * fixes for inserting suppressed panes without conflicts * pane focus history and explicit unsuppress plugin api * fix: prefer explicitly provided pane id in placement in actions that provide it * fix floating pane coordinate change and z_index * fix plugin cache dir to persist between sessions * fix some stack focusing issues when adding panes without a client id * make sure pinned panes are always above non-pinned floating panes * allow plugins to copy to clipboard * initial text styling additions implementations - buggy * fix dimming issues * remove extras, stay with just dim and unbold * unbold and dim as indices * allow ui components to render success/error colors * allow plugins to send sigint/sigkill to processes, as well as receive their pid * ui component fixes and send originating plugin context with run_action * originating plugin for new tab too * make plugn show pane command also expand stacked panes * add sequence plugin * remove macros * remove snapshots * add shortcut for sequence plugin * fix plugin tests * plugin tests for new apis * update snapshots for sequence shortcut * cleanups and formatting * Event::CwdChanged * moar cleanups * remove some warnings * remove mroe warnings * remove dead code * remove more dead code * fix minor bugs in sequence plugin * update sequence help and format codebase * fix conditional blocking cli commands * fix initial-command new-tab cli flag * add client_ids to CwdChanged Event * last fixes * add pr
* Improve CLI interface (add detach, switch session, blocking zellij run and ↵Aram Drevekenin2025-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | more) (#4492) * initial implementation * fix tests * move more ations * screen adjustments (does not compile) * plugin/pty adjustments (does not compile) * more progress, tests not compiling * fix tests * more progress, does not compile * more progress, compiles, tests failing * tests passing * rely on Drop for NotificationEnd * atomicify some more actions * fmt * move unblock input to route * don't pass hard-coded action names * refactor: consolidate completion channel logic * comment * track last active client * track cli clients explicitly * use the last active client for cli commands when possible * fix focus-next-pane for multiple clients * various fixes for multi-client actions from the cli * add detach action * fix tests * add switch session cli action * fix switch session deadlock * add and layout to switch-session cli action * blocking zellij run: add NewBlockingPane variant * blocking zellij run: wait forever mechanism * blocking zellij run: thread NotificationEnd as needed until TerminalPane (tests not compiling) * blocking zellij run: update cli * blocking zellij run: add command * blocking zellij run: finish implementation * fix tests * e2e test and close_on_exit fixes * fmt * fix e2e tests * fix plugin tests
* fix(ipc): make sessions compatible between versions (#4439)Aram Drevekenin2025-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * translate ipc tuple enum variants to struct enum variants * initial client/server contract * tests and missing types * migrate web server and remove rmp_serde * change socket folder * fix crash on unknown messages * fix client logout on unknown message * fix web client logout on unknown message * rustfmt * add comment and change log level * address compilation warnings * style(fmt): rustfmt * fix plugin system test assertions * add pr
* fix(serialization): don't serialize when only UI elements present and ↵Aram Drevekenin2025-07-08
| | | | | | | | | | | | | | | | | | | provide post command discovery hook (#4276) * do not serialize when only UI elements are present * start work on a post serialization hook * add post_command_discovery_hook * fix tests * style(fmt): rustfmt * some cleanups * moar formatting * docs(changelog): add PR
* fix(tabs): allow setting cwd without a layout (#4273)Aram Drevekenin2025-07-08
| | | | | | | | | * working for cli and keybinding * working for plugin API * style(fmt): rustfmt * docs(changelog): add PR