269 Commits
Author SHA1 Message Date
Aram Drevekenin b1033be2a3 Improved mouse handling (#5697)
* configurable mouse bindings

* feat(bars): reorder tabs with mouse drag, clickable status-bar shortcuts with hover effects

* fix tests

* add pr
2026-10-09 11:59:23 +02:00
Myah MitchellandAram Drevekenin 6af3a36eb8 feat(plugin-api): let a plugin give its layout space back while empty (#5590)
* feat(plugin-api): let a plugin give its layout space back while empty

A plugin mounted in a layout as a bar keeps the row the layout reserved
for it even when it has nothing to draw, so an empty bar shows as a blank
line. Nothing in the plugin API could give that row up: HideSelf
suppresses the pane and brings it back through add_tiled_pane, which
re-inserts it by splitting rather than at its layout position, and
CloseSelf does not come back at all.

SetSelfCollapsed takes the pane out of the constraint solve without
taking it out of the layout. The pane keeps its size constraint while it
is out, so a Fixed(1) bar is still Fixed(1) when it rejoins and expanding
restores exactly what the layout asked for, while constrain_spans makes
its neighbors grow over the space in the meantime.

Collapsed panes are tracked separately from panes_to_hide, which
fullscreen overwrites wholesale, so a collapse survives entering and
leaving fullscreen. They are also left out of the viewport offset, since
a pane holding no space must not shrink the viewport, and their state is
dropped when the pane closes so a reused pane id does not arrive already
invisible.

* test(tab): cover collapsing a pane out of the layout and back

Pins down what the collapse is for: the neighbors take the space, the
collapsed pane keeps its size constraint so expanding restores the layout
exactly rather than approximately, and the collapse outlives a fullscreen,
which rebuilds the hidden set from scratch.

Also covers the two ways it should do nothing: a second collapse of an
already collapsed pane, and a pane id that is not in the tab. Closing a
collapsed pane drops the state, so a reused id does not come back
invisible.

* fix(screen): keep one deferred collapse per pane instead of a queue

A plugin sends this whenever its content comes and goes, so a plugin
with no pane in any tab would otherwise leave an entry behind on every
change, all of them replayed the next time a tab is created. Only the
most recent word on a pane means anything, so drop the earlier one.

* fix(tab): keep a collapsed pane's geometry current across a relayout

Being filtered out of the constraint solve is what stops a collapsed pane
from holding space, but it also means nothing writes geometry to it. That
was fine while the tab kept its shape and wrong the moment it did not: the
pane was left describing a display area that no longer existed.

Worse than stale, because the solver reads the layout tree back off where
the panes currently sit. A one-row bar collapsed in a 121x20 tab that then
became 118x23 stayed at y 19 in a tab whose last row was 22, so the next
solve was handed a tree that did not match the screen and gave up. The bar
came back three rows above the bottom, at a width wider than the tab, and
its neighbor never gave the row back.

Let collapsed panes take part in the resize and the relayout, then collapse
them again over the result, which is what fullscreen already does a few
lines above for the same reason.

* docs(changelog): note the plugin collapse command

Links the tracking issue rather than a pull request, since no pull
request is open yet. Wants updating to the pull request URL once there
is one, to match every entry in the released sections.

* fix(tab): give a collapsed pane's row back to the viewport after a relayout

A relayout solves with the collapsed panes taking part, and the layout
offsets the viewport while they are still there. Collapsing them again
afterwards handed their rows back to the panes around them, but not to the
viewport, so a collapsed bar went on holding its row out of it until the
next resize. Fullscreen reads the viewport, so it would not cover that row
either.

Offset the viewport again once the collapsed panes are gone, the same as
resize_whole_tab already does.

* refactor(tiled-panes): keep the hidden pane bookkeeping in PanesToHide

Fullscreen and collapse both hide tiled panes, and each needs to undo only
what it hid. Until now that was done by keeping collapsed panes in a set of
their own and rebuilding panes_to_hide from both sources whenever either
changed, which every caller had to remember to do.

panes_to_hide is now a PanesToHide struct that tracks the two reasons
separately: panes beneath a fullscreen pane, and covered panes such as a
plugin that collapsed itself. set_fullscreen and unset_fullscreen only
touch the first, set_covered and unset_covered only the second, so a
covered pane stays hidden across a fullscreen without any rebuilding, and
the fullscreen pane itself is never hidden.

add_to_hidden_panels and remove_from_hidden_panels had no callers and
wrote straight into the set, so they are gone.

* fix(plugin-api): collapse the slot being rendered for a shared plugin

set_self_collapsed sent env.plugin_id, which for a shared plugin is the
instance and not any of its panes, so a shared plugin such as the bundled
bars could not collapse at all. Resolve the pane through self_pane_id like
the other self commands do, and list SetSelfCollapsed in is_self_command so
a shared plugin can only use it while a slot is current.

* feat(plugin-api): let a shared plugin collapse a slot by id

The other self commands have a slot form that names the pane outright, so
a shared plugin can use them from update or pipe, where no slot is current
and the self form is refused. set_collapsed_slot does the same for
set_self_collapsed, with the ownership check and response the other slot
commands give.

* fix: resurrection, covering selectable panes, mouse clicks, closing, paneinfo

* rebuild assets

---------

Co-authored-by: Aram Drevekenin <[email protected]>
2026-10-06 13:23:29 +02:00
Aram Drevekenin 201c1593da Interactive configuration, popups, notifications, right-click menu (#5685)
* ui components

* right click menu + popups

* settings screen

* various fixes

* presets in config

* zellij prompt - ui elements in the cli

* context menu shortcuts and toggle, keybindings in popups, info popups + zellij prompt notify

* smart config writing and some leftovers

* keybindings/right-click/config editors

* some wrapups

* feat(plugins): add prompt() plugin API for zellij:prompt, dialog forms, and Text labels in widgets

* theme editors

* upstream by-id action types, config env for new panes only, smaller saved menu config, web right-click, example config

* upstreamify

* rustfmt

* fix windows and theme editor layout

* add pr
2026-10-05 18:46:12 +02:00
ZykinoandZykino 66e6676698 Reduce a bit some code length and improve readability (#5681)
Co-authored-by: Zykino <[email protected]>
2026-10-04 23:42:10 +02:00
ZykinoandZykino ef497e1ae3 NestedListItem::new require Text instead of &str (#5611)
Part of the change was done with `ast-grep run -p 'Text::new($A)' -r 'Text::from($A)' --update-all`

Co-authored-by: Zykino <[email protected]>
2026-09-30 19:26:19 +02:00
Aram Drevekenin 208a0da5e9 Resource usage optimizations (#5662)
* shared instance plugins

* reduce needless allocations and share memory

* fix: read buffer bug

* idle plugin fixes and optimizations

* trim allocator for glibc on pane close

* fix flaky integration tests

* refactor: naming

* rustfmt

* add pr
2026-09-28 10:58:12 +02:00
Myah MitchellandAram Drevekenin 0591ca5432 feat(nested-sessions): report a guest's input mode and key bindings to its host (#5589)
* refactor(plugin-api): share the keybinding protobuf conversions

The conversion between a keybinding table and its protobuf form was written
out four times: once each way for the ModeUpdate and InitialKeybinds events.
Collect them into `keybinds_to_protobuf` and `keybinds_from_protobuf`.

Decoding now drops a binding whose key is missing instead of unwrapping it,
so a malformed or foreign payload can no longer panic the conversion, and a
mode whose key fails to convert costs only that binding rather than every
binding in the mode.

* feat(nested-sessions): carry input mode and keybindings over the protocol

A session hosting a nested session has no way to learn what that session is
doing, so its plugins cannot show hints for the session the user is actually
typing into. Add the three messages that carry it:

- GuestModeUpdate, sent by a guest whenever its input mode changes, so a host
  always knows which of the guest's bindings currently apply.
- RequestGuestKeybinds and GuestKeybindsUpdate, a query and its answer, for
  the far larger keybinding table. Keeping the table behind a query means it
  is fetched once by whoever wants it rather than pushed at every host.

The table travels as an encoded plugin-API payload in an opaque bytes field.
Describing keybindings natively here would mean restating the whole Action
schema in this contract, which the codegen compiles with only its own include
path. Reusing the existing payload also means a host and a guest built from
different Zellij versions exchange whatever both understand and silently drop
the rest, which is the behavior this wire needs.

An input mode is written under the name InputMode::from_str reads, so adding a
mode needs no change to this contract and an unknown mode is rejected rather
than misread.

Peers advertise the new HintReporting capability, so each side can tell
whether the other can take part before asking it anything.

* feat(plugin-api): expose nested session mode and keybinding events

Plugins running in a host session can see that a pane holds a nested guest
session, but they have no way to learn what that guest is doing. A status bar
in the host therefore keeps showing the host's own hints while the user is
descended into the guest, which is the wrong keybinding table for the keys the
user is actually pressing.

Add two events and one command covering that gap:

  - Event::NestedSessionModeUpdate reports a guest's input mode as it changes.
  - Event::NestedSessionKeybinds delivers a guest's full keybinding table.
  - PluginCommand::RequestNestedSessionKeybinds asks a guest pane for that
    table, which arrives asynchronously as the event above.

Both events carry the pane the guest runs in and the guest's session name, so
a plugin watching several nested panes can tell them apart. Keybindings are
requested rather than pushed because the table is large and most plugins never
need it.

* feat(nested-sessions): report guest input mode and keybindings to the host

Wire the nested session hint events end to end.

A guest announces the HintReporting capability during the handshake and, from
then on, emits a GuestModeUpdate frame whenever its input mode changes. The
mode is reported on every change rather than only while the host is descended,
so the host already holds the right mode the moment focus arrives and the
status bar does not lag behind the descent.

The host turns each such frame into Event::NestedSessionModeUpdate. It answers
PluginCommand::RequestNestedSessionKeybinds by writing a RequestGuestKeybinds
frame into the guest pane; the guest replies with its keybinding table plus its
current mode, and the host forwards the table as Event::NestedSessionKeybinds.

Requests to guests that did not advertise HintReporting are dropped rather than
written, and frames from panes whose guest is not currently live are ignored,
matching how the other guest-to-host frames are handled.

Both events and the command require the ReadApplicationState permission, the
same gate ModeUpdate uses.

* test(nested-sessions): cover guest mode and keybinding reporting

Unit tests over the contract check that every input mode survives the round
trip under its own name, that a mode name the reading side does not know is
rejected rather than guessed at, and that a keybinding table keeps its modes,
keys and actions across the wire. The undecodable and empty payload cases are
covered too, since a host and a guest may be built from different versions.

Integration tests drive two real sessions bridged through a pane: both sides
advertise hint reporting during the handshake, the guest answers a keybinding
request with a populated table plus its current mode, and the guest reports
each mode change while the user is descended into it.

* test(nested-sessions): drop unknown capabilities without losing known ones

A peer built from a newer Zellij can advertise capabilities this side has
never heard of, so pin down that they are ignored individually rather than
invalidating the whole advertisement.

* feat(nested-sessions): carry the guest's base mode alongside its input mode

A host plugin that only knows a guest's current mode cannot tell which of the
guest's bindings are inherited from its base mode. Zellij's own hint rendering
leans on that distinction: bindings the base mode already advertises are
inherited by every other mode through `shared_except` groups, so repeating them
in each mode is noise. Without the guest's base mode a host plugin either
suppresses the wrong bindings or suppresses none.

A guest with a non-Normal base mode, such as an unlock-first config, is where
this shows: assuming Normal there hides the wrong half of its bindings.

The base mode rides along on the existing mode message, so a guest that has not
switched modes yet still reports one, resolved the way the rest of Screen
resolves it (the configured default mode is the base). It stays optional on the
wire, so a name the reading side does not recognize costs only the
inherited-binding distinction rather than the whole message.

* feat(nested-sessions): report the guest's mode when the handshake completes

A guest only pushed its input mode when that mode changed, so a host that
had just picked up a nested session learned nothing about it until the user
happened to switch modes inside it. A host plugin has no other way to tell
which of its panes holds a session worth asking for keybindings, which left
it unable to act on the feature at all in the common case of a guest sitting
in its starting mode.

Send the report once on contact as well, and reuse the same client mode
lookup the keybinding answer already did.

* docs(changelog): note the nested session hint reporting events

* fix(nested-sessions): drop guest keybindings on control characters

Nothing a guest says is authenticated. Its frames travel in the terminal
stream of the pane it runs in, so any program with that pane can write them,
including a keybinding table claiming a binding on a raw control character.
A host that draws those bindings puts their keys on its own screen, where a
control character is a terminal escape in the host's output rather than a
key anyone could press.

Drop them where the guest's payload is decoded, so no host plugin inherits
the problem. Zellij spells the control keys that do exist as their own
BareKey variants, so a Char holding one describes no binding worth keeping.

* test(nested-sessions): expect hint reporting in the announce ack

The host now advertises HintReporting alongside NestedControl when it
acknowledges a guest, so the assertion on the exact capability list had to
follow.

* fix(plugin-api): drop only what has no protobuf form when writing keybindings

keybinds_to_protobuf failed the whole table on the first key or mode it could
not represent, so one unrepresentable binding cost the caller every binding:
a ModeUpdate that failed to convert entirely, and a nested session's answer
that reached its host as an empty table indistinguishable from a session with
no bindings at all.

Drop the individual mode, key or action instead, which is what the reading
half already does and what the writing half already did for actions. A table
now survives the trip between builds minus whatever they do not have in
common.

* fix(nested-sessions): keep a host's view of the guest fresh across a reconfigure

A reconfigure rewrites a session's keybindings and base mode without going
through change_mode, and keybindings are otherwise only ever sent in answer
to a request. A host that had already asked once therefore kept drawing the
table the guest had before its config was reloaded, with no way of noticing
it had gone stale, and would not have picked up the new base mode until the
user happened to switch modes inside the guest.

Report both from reconfigure, next to the shortcut broadcast that already
happens there. Answer a keybinding request from the requesting client's own
table too, since a reconfigure with write_to_disk unset rebinds only the
client that asked: the mode in the same reply already came from that client,
so the two halves now describe the same thing.

* fix: adjust protocol + API

* Update CHANGELOG.md

---------

Co-authored-by: Aram Drevekenin <[email protected]>
2026-09-24 14:43:03 +02:00
Aram DrevekeninandLucca Huguet 81f56e1aed Yazelix fixes (sixel/kitty correctness, explicit-swap-layout change rather than toggle, border styling) (#5630)
* fix: sixel image reaping/id-reuse

* fix: kitty scaling issues

* fix: stacked pane ordering

* feat: apply tiled/floating swap layout by name

* border styling

* fix tests

* fix: complete Yazelix feature validation (#5631)

* fix: retire client-ids instead of reusing them

* distributions

* rustfmt

* fix tests

* update changelog

* fix tests and race

---------

Co-authored-by: Lucca Huguet <[email protected]>
2026-09-24 09:26:20 +02:00
Oli Treadwell (he/him) a162323384 fix: correct typos in docs and code comments (#5599) 2026-09-09 19:16:46 +02:00
MsfPablo b961fac6fb Fix typos in comments, docs and error messages (#5490) 2026-08-19 22:18:17 +02:00
ZykinoandZykino 30c9d2fcb4 Add missings sugar functions NestedListItem::*color* in plugin API (#5412)
Co-authored-by: Zykino <[email protected]>
2026-08-11 08:43:48 +02:00
Aram Drevekenin 3239d37b40 Native web mobile UI (#5441)
* initial chrome

* mobile state

* feat(mobile-web): implement browser→server actions (fit toggle, single-pane fullscreen, pane/tab focus) with fullscreen-truth reconciliation

* panning

* remove mobile plugin

* fix first load race

* improve web handshake

* rustfmt

* cleanups

* moar cleanups

* add bundle asset check to ci

* fix(mobile-web): tab-scope co-presence, yield single-pane to desktop clients, fix render-mode desync

* make mobile use no-ui fullscreen

* client side welcome screen for mobile

* attach web clients to first tab on tiles surface

* fix: opening new pane in mobile single mode no longer exits mobile single mode

* mobile chrome light theme support

* fix server races and flaky tests

* rustfmt

* fix flakes

* add pr
2026-08-05 15:32:53 +02:00
Aram Drevekenin 9969ed10b2 Dep upgrades for debian (#5420)
* chore(deps): upgrade base64 0.22, colored 3.1, crossterm 0.29, dialoguer 0.11, directories 6.0, highway 1.2, prost 0.12.6, strip-ansi-escapes 0.2.1, suggest 0.5.1

* chore(deps): upgrade miette 7.6, nix 0.30, notify 8.2, notify-debouncer-full 0.5

* vte 0.15

* clap 4.6

* workspaceify plugin deps

* don't send empty fs watch events
2026-07-28 12:05:38 +02:00
Aram Drevekenin ea07e2d5b6 Nested session handling (#5417)
* 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
2026-07-27 18:24:37 +02:00
Aram Drevekenin 245f5141c9 Title frames (#5318)
* 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
2026-06-29 18:10:59 +02:00
DawidPietrykowskiandAram Drevekenin ebd731b0ff feat(panes): FocusLastPane action (#4241)
* 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 <[email protected]>
2026-06-25 18:12:51 +02:00
Aram Drevekenin b6a5ad0e5a Mobile layout (#5241)
* 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
2026-06-10 16:50:55 +02:00
Aram Drevekenin fc6c5942a1 Welcome screen del fix (#5160)
* fix: session-manager delete

* rustfmt

* add pr
2026-05-12 12:20:23 +02:00
Aram Drevekenin aa29cbaf66 Some idle CPU and disk/io fixes, new CommandChanged plugin Event (#5063)
* initial implementation

* fix mouse cpu spam

* prevent excess metadata write and prune sessions on startup

* consolidate CommandChanged and PaneCommandChanged

* tests

* rustfmt

* add pr
2026-04-17 14:08:48 +02:00
divensanddivens 3fa7744906 Add windows support in strider (#4854)
* Add Windows path support to strider plugin

Strider is a WASM plugin where std::path::PathBuf uses Unix semantics,
so Windows backslash paths break parent(), join(), strip_prefix(), etc.

Fix by normalizing all incoming paths to forward slashes at plugin
boundaries and converting back to native backslashes for display. A new
platform.rs module detects the host OS at runtime from the initial_cwd
format and centralizes all platform-aware logic.

Also fix scan_host_folder on the server side: canonicalize
plugin_host_folder so the starts_with security check works on Windows,
where canonicalize() adds the \?\ prefix.

* Add virtual root view for drive and WSL navigation in strider

On Windows, navigating up from a drive root (e.g. C:\) now shows a
"Computer" view listing all available drives and WSL distributions.
Drives are enumerated via GetLogicalDriveStringsW and WSL distros
via `wsl -l -q` (since read_dir on \wsl.localhost fails with OS
error 64/67). Drive letters appear before WSL entries, which are
displayed as "Ubuntu-24.04 (WSL)" etc. On non-Windows platforms,
behavior is unchanged.

* Rename ListHostEntries to ListWindowsVolumes and gate behind FullHdAccess

The old name was misleading — on Unix it just returned `/`, which isn't
"listing host entries." Rename to ListWindowsVolumes to make the
Windows-specific intent explicit, gate behind FullHdAccess permission,
and replace the Unix implementation with a log::error since the command
is not meaningful on non-Windows platforms.

* Replace direct array indexing with .get() in strider platform detection

Use safe accessors and matches! macro instead of direct byte indexing
for bounds-checked access patterns.

---------

Co-authored-by: divens <[email protected]>
2026-03-21 19:20:32 +01:00
Aram Drevekenin 4ba41c085a Release notes and fixes (#4879)
* release notes

* fix some link issues

* rustfmt

* fix click wording
2026-03-20 17:28:36 +01:00
Aram Drevekenin 85d29a1e66 fix: click links with alt-click (#4809) 2026-03-06 15:23:17 +01:00
Aram Drevekenin 903cdf5d32 Click file paths to open in editor, allow plugins to change styles and hover of viewport (#4802)
* initial implementation

* implement hover

* add styles and foreground/background emphases, fix upsert hover collisions

* initial implementation of link plugin

* suppress highlighting + clicks on unfocused and mouse mode panes

* also make italic

* fix env var and ~ expansions

* fix regex issues and add defensive validations

* fix tests and add plugin assets

* add tests

* refactor all the things

* add pr
2026-03-05 21:13:02 +01:00
f77cdec298 feat: add per-pane default foreground/background color support (#4737)
* 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 <[email protected]>
Co-authored-by: Aram Drevekenin <[email protected]>
2026-03-04 14:26:26 +01:00
Aram Drevekenin 6e0dd8e51c Atomic show hide floating panes (#4764)
* atomic show/hide floating panes (cli, plugin API, keybinding)

* rustfmt

* add pr
2026-02-25 09:48:47 +01:00
Aram Drevekenin 4e66a0beff Revamp the sequence plugin (#4713)
* initial pipe interface

* initial open_x_pane_in_new_tab plugin api implementation

* fix: send CommandPaneExited for command panes opened as initial_terminals in new tabs from plugins

* open panes in place of specific pane id plugin commands - initial implementation

* sequence and plugin api ux

* focus self when starting

* combine ui and pipe paths

* highlight selected pane

* initial sequence removal of editing capabilities

* fix: translate plugin paths in api

* properly trim commands when loaded from pipe or pasted text

* minor ux fixes

* get ctrl c to work properly

* behavior fixes

* more ui fixes

* fix tests

* close tab and end sequence properly

* default to AND

* zellij sequence alias

* add alias

* consolidate paths

* rustfmt

* fix ui padding

* add pr

* fix: reset scrolling when resetting terminal state
2026-02-17 15:43:28 +01:00
Aram Drevekenin e887164a0a Allow plugins to read env vars present upon session creation (behind permission) (#4700)
* allow plugins to read environment variables

* rustfmt

* add pr
2026-02-12 18:35:55 +01:00
Aram Drevekenin 860e8e323a Improve plugin API ergonomics and add CLI goodies (#4690)
* return created tab_id from relevant plugin API methods

* add to cli

* return Option<PaneId> in plugin API methods that create panes

* return created pane_id in cli for relevant actions

* allow plugins to query for pane_info based on pane_id

* allow plugins to query for TabInfo by its id

* allow plugins to query pane command/cwd synchronously

* zellij action list-panes

* style and formatting

* fix e2e tests

* add pr
2026-02-10 10:42:46 +01:00
Aram Drevekenin cdbdf2b667 Allow saving current session for resurrection on demand (#4654)
* initial implementation

* session manager ui and plugin api

* remove event

* cleanups and formatting

* add pr
2026-01-29 11:53:56 +01:00
Aram Drevekenin 03c86d09cf Allow toggling pane frames for specific panes (#4615)
* 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
2026-01-20 10:13:37 +01:00
Aram Drevekenin 4a27ceea0d Layout manager (#4601)
* 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
2026-01-13 11:27:07 +01:00
Aram Drevekenin 1296a46a68 Read only web tokens (#4551)
* initial implementation

* fix race condition potentially allowing read-only clients to gain write access

* clear read only status on disconnect

* cleanups and formatting

* fix tests

* refactor first message + ipc pipe creation out of trait

* fix web tests

* fix web tests again

* refactor: move os_input connection establishment to session manager trait

* add read-only-token tests

* fix: identify watchers as web-clients when they are and enforce no-web-clients for them as well

* identify watcher web clients on the server

* fix tests

* cleanups and formatting

* add read-only-tokens to the plugin api

* update share plugin ui for read-only tokens

* cleanups and formatting

* docs(changelog): add PR
2025-12-16 09:16:41 +01:00
Aram Drevekenin 693fa082de Command Sequences, Blocking CLI Commands, New Plugin APIs (#4546)
* 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
2025-12-11 14:25:42 +01:00
Aram Drevekenin 7e66ae3125 Give plugins the ability to read pane contents (#4465)
* initial implementation

* add Selection and better types

* event to plugins

* only send viewport diff

* simplify data structure sent over the wire

* cleanups

* rustfmt

* remove dead code and fix tests

* commit tests

* get pane scrollback plugin command without implementation

* add lines above and lines below to pane contents

* implement get scrollback plugin command

* selection => selected_text

* add convenience method to get the selected text

* move Selection back to zellij-server

* rustfmt

* bring back client id to get contents command

* rustfmt

* add pr
2025-10-09 11:29:55 +02:00
har7an 80de7f462c build(cargo): Update Rust toolchain to 1.90.0 (#4457)
* build(cargo): Define shared manifest properties workspace-wide

in order to allow workspace members to easily copy their values, rather
than copying the actual values manually between files. Prepare for a
future update of the Rust edition this way by defining the edition in
one central location.

* build(cargo): Share the license between all workspace members

and don't copy the actual license value manually between crates.

* build(cargo): Share the rust edition between workspace members

rather than manually defining the value per crate. There is no
apparent advantage in having different parts of the code use different
rust editions. It only makes the code inconsistent, which is not a goal
worth striving for.

* build(cargo): Share the crate version between workspace members

at least for those workspace members that are versioned in lockstep.

* refactor(session-manager): Migrate to Rust edition 2021

from edition 2018 in order to use a single unified Rust edition across
the entire workspace. Apparently the migration does not involve changes
to the actual code.

* refactor(plugin-manager): Migrate to Rust edition 2021

from edition 2018 in order to use a single unified Rust edition across
the entire workspace. Apparently the migration does not involve changes
to the actual code.

* build(zellij-utils): Remove the obsolete build script

which has contained nothing but comments for two years now. The initial
"workaround" has by now become the proper solution and the original
issue (see <https://github.com/zellij-org/zellij/pull/2711>) has never
been heard of since.

The real motivation for this change is the simple fact that this version
of prost-build pulled in a pretty old version of the `which` crate which
doesn't appear to build with Rust 1.89 (latest stable as of now).

* build(cargo): Update Rust toolchain to 1.89

which is the latest stable toolchain as of writing this and has support
for the 2024 Rust edition, unlike the previously used 1.84.

* fixup! build(zellij-utils): Remove the obsolete build script

* refactor: Make implicitly elided lifetimes explicit

in cases where a functions return type has an actual lifetime that
depends on a non `'static` argument.

* build(cargo): Update Rust toolchain to 1.90.0

which is the latest stable toolchain as of writing this. Compared to
1.89.0 this changes the default linker and should, hence, cut down
iteration times during development significantly.

* ci: Force configured rust toolchain version in release builds

for the tagged release assets. Previously the rust version was
unconditionally overwritten to be `stable` regardless of what
`rust-toolchain.toml` configured.

* docs(changelog): Add MR #4457

to list of unreleased changes.

* build: Read package version from workspace version value

since it no longer resides directly in the `package` object.
2025-10-06 17:11:34 +00:00
Aram Drevekenin 1a2d744520 chore(repo): update development version 2025-08-08 15:17:58 +02:00
Aram Drevekenin d121d8e016 chore(release): v0.43.1 2025-08-08 14:54:42 +02:00
Aram Drevekenin 1398e1eefc chore(repo): update development version 2025-08-05 11:01:18 +02:00
Aram Drevekenin 6af82a9e99 fix(plugins): multiple-select + compact-bar tooltip multiplayer issues (#4312)
* fix: allow stacking panes if root pane is floating

* fix: handle multiple client gracefully in multiple select

* style(fmt): rustfmt

* fix compact-bar tooltip multiuser duplication

* style(fmt): rustfmt
2025-07-22 09:13:41 +02:00
Aram Drevekenin 358caa180c fix(tabs): allow setting cwd without a layout (#4273)
* working for cli and keybinding

* working for plugin API

* style(fmt): rustfmt

* docs(changelog): add PR
2025-07-08 11:06:03 +02:00
Aram Drevekenin 11015c8fe4 feat(plugin-api): allow replacing pane with existing pane (#4246)
* work

* make the api work

* some cleanups

* close pane

* style(fmt): rustfmt
2025-06-26 13:51:17 +02:00
Aram DrevekeninandThomas Linford c5ac796880 Feature: web-client/server to share your sessions in the browser (#4242)
* work

* moar work

* notes

* work

* separate to terminal and control channels

* stdin working

* serve html web client initial

* serve static assets loaded with include_dir

* merge

* enable_web_server config parameter

* compile time flag to disable web server capability

* rustfmt

* add license to all xterm.js assets

* mouse working except copy/paste

* helpful comment

* web client improvements

- move script to js file
- add favicon
- add nerd font
- change title

TODO: investigate if font license embedded in otf is sufficient

* get mouse to work properly

* kitty keyboard support initial

* fix wrong type in preload link

* wip axum websocket handlers

- upgrade axum to v0.8.1, enable ws feature
- begin setup of websocket handlers
- tidy up imports

* replace control listener

* handle terminal websocket with axum

* cleanup Cargo.toml

* kitty fixes and bracketed paste

* fix(mouse): pane not found crash

* initial session switching infra

* add `web_client_font` option

* session switching, creation and resurrection working through the session manager

* move session module to zellij-utils and share logic with web-client

* some cleanups

* require restart for enable-web-server

* use session name from router

* write config to disk and watch for config changes

* rename session name to ipc path

* add basic panic handler, make render_to_client exit on channel close

* use while let instead of loop

* handle websocket close

* add mouse motions

* make clipboard work

* add weblink handling and webgl rendering

* add todo

* fix: use session name instead of patch on session switch

* use "default" layout for new sessions

* ui indication for session being shared

* share this session ui

* plugin assets

* Fix process crash on mac with notify watcher.

Use poll watcher instead of recommended as a workaround.

* make url session switching and creation work

* start welcome screen on root url

* scaffold control messages, set font from config

* set dimensions on session start

* bring back session name from url

* send bytes on terminal websocket instead of json

- create web client os input and id before websocket connection

* draft ui

* work

* refactor ui

* remove otf font, remove margins to avoid scrollbar

* version query endpoint for server status

* web session info query endpoint

* refactor: move stuff around

* add web client info to session metadata

* make tests pass

* populate real data in session list

* remove unnecessary endpoint

* add web_client node to config, add font option

* remove web_client_font

* allow disabling the web session through the config - WIP

* formalize sharing/not-sharing configuration

* fix tests

* allow shutting down web server

* display error when web clients are forbidden to attach

* only show sessions that allow web clients if this is a web client

* style(fmt): rustfmt

* fix: query web server from Zellij rather than from each plugin

* remove log spam

* handle some error paths better in the web client

* allow controlling the web server through the cli

* allow configuring the web server's ip/port

* fix tests and format code

* use direct WebServerStatus event instead of piggy-backing on SessionInfo

* plugin revamp initial

* make plugin responsive

* adjust plugin title

* refactor: share plugin

* refactor: share plugin

* add cors middleware

* some fixes for running without a compiled web server capability

* display error when starting the share plugin without web server support

* clarify config

* add pipelines to compile zellij without web support

* display error when unable to start web server

* only query web server when share plugin is running

* refactor(web-client): connection table

* give zellij_server_listener access to the control channel

* fixes and clarifications

* refactor: consolidate generate_unique_session_name

* give proper error when trying to attach to a forbidden session

* change browser URL when switching sessions

* add keyboard shortcut

* enforce https when bound to non-loopback ip

* initial authentication token implementation

* background color from theme

* initial web client theme config

* basic token generation ui

* refactor set config message creation

* also set body background

* allow editing scrollback for plugins too

* set scrollback to 0

* properly parse colors in config

* generate token from plugin

* nice login modals

* initial token management screen

* implement token authentication

* refactor(share): token management screen

* style(fmt): rustfmt

* fix(plugin): some minor bugs

* refactor(share): main screen

* refactor(share): token screen

* refactor(share): main

* refactor(share): ui components

* fix(responsiveness): properly send usage_width to the render function

* fix cli commands and add some verbosity

* add support for settings ansi and selection colors

* add cursor and cursor accent

* basic web client tests

* fix tests

* refactor: web client

* use session tokens for authentication

* improve modals

* move shutdown to ipc

* refactor: ipc logic

* serialize theme config for web client

* update tests

* refactor: move some stuff around to prepare for config hot reload

* config live reloading for the web clients

* change remember-me UI wording

* improve xterm.js link handling

* make sure terminal is focused on mousemove

* remove deprecated sharing indication from compact-bar

* gate deps and functionality behind the web_server_compatibility feature

* feat(build): add --no-web flag in all the places

* fix some other build flows

* add new assets

* update CI for no-web (untested)

* make more dependencies optional

* update axum-extra

* add web client configuration options

* gracefully close connections on server exit

* tests for graceful connection closing

* handle client-side reconnect when server is down

* fix: make sure ipc bus folder exists before starting

* add commands to manage login tokens from the cli

* style(fmt): rustfmt

* some cleanups

* fix(ux): allow alt-right-click on the web client without opening the context menu

* fix: prevent attaching to welcome screen

* fix: reload config issues

* fix long socket path on macos

* normalize config conversion and fix color gap in browser

* revoke session_token cookie if it is not valid

* fix: visual bug with multiple clients in extremely small screen sizes

* fix: only include rusqlite for the web server capability builds

* update e2e snapshots

* refactor(web): client side js

* some cleanups

* moar cleanups

* fix(tests): wait for server instead of using a fixed timeout

* debug CI

* fix(tests): use spawn_blocking for running the test web server

* fix(tests): wait for http rather than tcp port

* fix(tests): properly pass config path - hopefully this is the issue...

* success! bring back the rest of the tests

* attempt to fix the macos CI issue

* docs(changelog): add PR

---------

Co-authored-by: Thomas Linford <[email protected]>
2025-06-23 19:19:37 +02:00
Aram Drevekenin 7ef7cd5ecd feat(ui): add optional tooltip with key hints to the compact bar (#4225)
* initial implementation

* some refactoring

* refactor: separate some concerns and tidy up

* fix: move tooltip to focused tab as needed

* some ux adjustments

* some refactoring

* only show tooltip if we have configured a shortcut key

* add plugin artifacts

* fix tests

* truncate tooltip if it exceeds width

* change config name

* remove comment

* docs(changelog): add PR
2025-06-10 17:23:46 +02:00
Aram Drevekenin a9f8bbcd19 feat(ux): improve multiple select (#4221)
* intercept/clear-intercept key APIs

* allow opening a pinned unfocused floating pane

* rework plugin

* improve some apis

* fix tests

* tests for pane groups

* more exact placement and tests

* plugin command permission and cleanup

* improve some multiselect ux

* improve plugin ui

* remove old status indicator

* allow moving plugin out of the way

* style(fmt): rustfmt

* update plugins

* remove old keybinding

* cleanups

* fix: only rename pane if needed

* changelog and some cleanups

* style(fmt): rustfmt
2025-06-03 17:15:32 +02:00
Aram Drevekenin 27c8986939 feat: multiple Select and Bulk Pane Actions (#4169)
* initial implementation with break panes to new tab

* break pane group left/right

* group embed/eject panes

* stack pane group on resize

* close pane group

* style(fmt): rustfmt

* fix tests

* group drag and ungroup with the mouse

* fix mouse hover for multiple clients

* fix for multiple clients

* multiple select plugin initial

* use real data in plugin

* adjust functionality

* fix some ux issues

* reflect group mouse group selections in plugin

* group/ungroup panes in Zellij

* highlight frames when marked by the plugin

* refactor: render function in plugin

* some ui responsiveness

* some more responsiveness and adjust hover text

* break out functionality

* stack functionality

* break panes left/right and close multiple panes

* fix(tab): only relayout the relevant layout when non-focused pane is closed

* status bar UI

* embed and float panes

* work

* fix some ui/ux issues

* refactor: move stuff around

* some responsiveness and fix search result browsing bug

* change plugin pane title

* differentiate group from focused pane

* add keyboard shortcut

* add ui to compact bar

* make boundary colors appear properly without pane frames

* get plugins to also display their frame color

* make hover shortcuts appear on command panes

* fix: do not render search string component if it's empty

* BeforeClose Event and unhighlight panes on exit

* some UI/UX fixes

* some fixes to the catppuccin-latte theme

* remove ungroup shortcut

* make some ui components opaque

* fix more opaque elements

* fix some issues with stacking pane order

* keyboard shortcuts for grouping

* config to opt out of advanced mouse actions

* make selected + focused frame color distinct

* group marking mode

* refactor: multiple-select plugin

* adjust stacking group behavior

* adjust flashing periods

* render common modifier in group controls

* add to compact bar

* adjust key hint wording

* add key to presets and default config

* some cleanups

* some refactoring

* fix tests

* fix plugin system tests

* tests: group/ungroup/hover

* test: BeforeClose plugin event

* new plugin assets

* style(fmt): rustfmt

* remove warnings

* tests: give plugin more time to load
2025-04-29 20:52:17 +02:00
Aram Drevekenin 905892439f chore: update development version 2025-04-15 09:45:04 +02:00
Aram Drevekenin f7546ae43b chore: update patch version 2025-04-15 09:09:03 +02:00
har7an 6be8c495bc build: Don't re-export foreign crates in utils (#4087)
* build(utils): Don't use reexported dependency

for internal code, but use the dependency directly.

* build(client): Don't use re-exports from `utils`

but turn `zellij-utils` dependencies into shared workspace dependencies
instead and specify those in `Cargo.toml` explicitly. This gives a much
better overview of what component in zellij uses which crates. The
previous approach hides a lot of this information since it looks like
crates are used in a single place where this isn't actually true.

* deps(tile): Don't use re-exports from zellij-utils.

* build(zellij): Don't use re-exports from zellij-utils.

* build(server): Don't use re-exports from zellij-utils.

* build(utils): Don't re-export foreign crates.

* docs: Update Changelog with PR #4087.

* style: Apply rustfmt.

* style: Apply rustfmt.

* build(e2e): Don't use re-export from zellij-utils.

* test: Restore e2e tests.

* style: Apply more formatting.
2025-03-23 10:03:42 +00:00
har7an 25e5f551c0 chore: Introduce workspace dependencies (#4085)
* cargo: Introduce workspace dependencies

and deduplicate dependency entries across all non-plugin workspace
members. In the future this hopefully makes dependency upgrade easier
since shared dependencies need only be touched in one location.

* docs: Update CHANGELOG with PR #4085.
2025-03-22 12:57:32 +00:00
Aram Drevekenin 5081352b54 chore(repo): update development version 2025-03-21 10:11:37 +01:00