A terminal workspace with batteries included
Go to file
Aidan Hobson Sayers 96b70e688e
fix(terminal): some real/saved cursor bugs during resize (#3032)
* refactor: Simplify transfer_rows_from_viewport_to_lines_above

next_lines is always consolidated to a single Row, which immediately
gets removed - we can remove some dead code as a result

* perf: Batch remove rows from the viewport for performance

Given a 1MB line catted into the terminal, a toggle-fullscreen +
toggle-fullscreen + close-pane + `run true` goes from ~9s to ~3s

* perf: Optimize Row::drain_until by splitting chars in one step

Given a 10MB line catted into the terminal, a toggle-fullscreen +
toggle-fullscreen + close-pane + `run true` goes from ~23s to ~20s

* refactor: Simplify `if let` into a `.map`

* refactor: There are only new saved coordinates when there were old ones

* refactor: Unify viewport transfer: use common variable names

* fix: Use same saved cursor logic in height resize as width

See #2182 for original introduction that only added it in one branch,
this fixes an issue where the saved cursor was incorrectly reset when
the real cursor was

* fix: Correct saved+real cursor calculations when reflowing long lines

* fix: Don't create canonical lines if cursor ends on EOL after resize

Previously if a 20 character line were split into two 10 character
lines, the cursor would be placed on the line after the two lines.
New characters would then be treated as a new canonical line. This
commit fixes this by biasing cursors to the end of the previous line.

* fix: for cursor index calculation in lines that are already wrapped

* chore: test for real/saved cursor position being handled separately

* chore: Apply cargo format

* chore(repo): update issue templates

* Bump rust version to 1.75.0 (#3039)

* rust-toolchain: Bump toolchain version to 1.69.0

which, compared to the previous 1.67.0, has the following impacts on
`zellij`:

- [Turn off debuginfo for build deps][2]: Increases build time (on my
  machine) from ~230 s in 1.67.0 to ~250 s now, *which is unexpected*

This version also changes [handling of the `default-features` flag][3]
when specifying dependencies in `Cargo.toml`. If a dependent crate
requires `default-features = true` on a crate that is required as
`default-features = false` further up the dependency tree, the `true`
setting "wins". We only specify `default-features = false` for three
crates total:

- `names`: This is used only by us
- `surf`: This is used only by us
- `vte`: This is also required by `strip-ansi-escapes`, but that has
  `default-features = false` as well

How this affects our transitive dependencies is unknown at this point.

[2]: https://github.com/rust-lang/cargo/pull/11252/
[3]: https://github.com/rust-lang/cargo/pull/11409/

* rust-toolchain: Bump toolchain version to 1.70.0

which, compared to the previous 1.69.0, as the following impacts on
`zellij`:

1. [Enable sparse registry checkout for crates.io by default][1]

This drastically increases the time to first build on a fresh rust
installation/a rust installation with a clean cargo registry cache.
Previously it took about 75s to populate the deps/cache (with `cargo
fetch --locked` and ~100 MBit/s network), whereas now the same process
takes ~10 s.

2. [The `OnceCell` type is now part of std][2]

In theory, this would allow us to cut a dependency from `zellij-utils`,
but the `once_cell` crate is pulled in by another 16 deps, so there's no
point in attempting it right now.

Build times and binary sizes are unaffected by this change compared to
the previous 1.69.0 toolchain.

[1]: https://github.com/rust-lang/cargo/pull/11791/
[2]: https://doc.rust-lang.org/stable/std/cell/struct.OnceCell.html

* rust-toolchain: Bump toolchain version to 1.75.0

which, compared to the previous 1.70.0, has the following impacts on
`zellij`:

1. [cross-crate inlining][8]

This should increase application performance, as functions can now be
inlined across crates.

2. [`async fn` in traits][9]

This would allow us to drop the `async_trait` dependency, but it is
currently still required by 3 other dependencies.

Build time in debug mode (on my own PC) is cut down from 256s to 189s
(for a clean build). Build time in release mode is cut down from 473s to
391s (for a clean build). Binary sizes only change minimally (825 MB ->
807 MB in debug, 29 MB -> 30 MB in release).

[8]: https://github.com/rust-lang/rust/pull/116505
[9]: https://github.com/rust-lang/rust/pull/115822/

* chore: Apply rustfmt.

* CHANGELOG: Add PR #3039.

* feat(plugins): introduce 'pipes', allowing users to pipe data to and control plugins from the command line (#3066)

* prototype - working with message from the cli

* prototype - pipe from the CLI to plugins

* prototype - pipe from the CLI to plugins and back again

* prototype - working with better cli interface

* prototype - working after removing unused stuff

* prototype - working with launching plugin if it is not launched, also fixed event ordering

* refactor: change message to cli-message

* prototype - allow plugins to send messages to each other

* fix: allow cli messages to send plugin parameters (and implement backpressure)

* fix: use input_pipe_id to identify cli pipes instead of their message name

* fix: come cleanups and add skip_cache parameter

* fix: pipe/client-server communication robustness

* fix: leaking messages between plugins while loading

* feat: allow plugins to specify how a new plugin instance is launched when sending messages

* fix: add permissions

* refactor: adjust cli api

* fix: improve cli plugin loading error messages

* docs: cli pipe

* fix: take plugin configuration into account when messaging between plugins

* refactor: pipe message protobuf interface

* refactor: update(event) -> pipe

* refactor - rename CliMessage to CliPipe

* fix: add is_private to pipes and change some naming

* refactor - cli client

* refactor: various cleanups

* style(fmt): rustfmt

* fix(pipes): backpressure across multiple plugins

* style: some cleanups

* style(fmt): rustfmt

* style: fix merge conflict mistake

* style(wording): clarify pipe permission

* docs(changelog): introduce pipes

* fix: add some robustness and future proofing

* fix e2e tests

---------

Co-authored-by: Aram Drevekenin <aram@poor.dev>
Co-authored-by: har7an <99636919+har7an@users.noreply.github.com>
2024-01-22 09:35:14 +01:00
.cargo Use rust 1.67 (#2375) 2023-05-09 02:43:28 +00:00
.github chore(repo): update issue templates 2023-12-28 16:46:14 +01:00
assets chore(assets): adjust logo (#2358) 2023-04-12 15:04:01 +02:00
default-plugins feat(plugins): introduce 'pipes', allowing users to pipe data to and control plugins from the command line (#3066) 2024-01-17 12:10:49 +01:00
docs docs: Update Arch Linux package URL in THIRD_PARTY_INSTALL.md (#2956) 2023-12-01 18:51:32 +01:00
example chore(release): v0.39.0 2023-11-07 08:36:31 +01:00
src fix(terminal): some real/saved cursor bugs during resize (#3032) 2024-01-22 09:35:14 +01:00
xtask xtask: Disable pusing during publish (#3040) 2024-01-20 12:47:21 +00:00
zellij-client feat(plugins): introduce 'pipes', allowing users to pipe data to and control plugins from the command line (#3066) 2024-01-17 12:10:49 +01:00
zellij-server fix(terminal): some real/saved cursor bugs during resize (#3032) 2024-01-22 09:35:14 +01:00
zellij-tile feat(plugins): introduce 'pipes', allowing users to pipe data to and control plugins from the command line (#3066) 2024-01-17 12:10:49 +01:00
zellij-tile-utils chore(version): bump development version 2023-11-29 13:13:23 +01:00
zellij-utils feat(plugins): introduce 'pipes', allowing users to pipe data to and control plugins from the command line (#3066) 2024-01-17 12:10:49 +01:00
.editorconfig add: editorconfig (#1156) 2022-03-02 12:12:26 +01:00
.gitignore chore(repo): remove nix support (#2038) 2022-12-20 12:24:19 +01:00
.rustfmt.toml add(style): add trailing comma in match blocks (#1483) 2022-06-10 20:03:13 +02:00
Cargo.lock perf: improve plugin download & load feature (#3001) 2023-12-13 01:21:32 +09:00
Cargo.toml chore(version): bump development version 2023-11-29 13:13:23 +01:00
CHANGELOG.md xtask: Disable pusing during publish (#3040) 2024-01-20 12:47:21 +00:00
CODE_OF_CONDUCT.md docs(coc): initial 2020-10-27 11:11:10 +01:00
CONTRIBUTING.md chore(repo): update build instructions 2023-08-28 17:47:49 +02:00
docker-compose.yml fix(docker-compose): Use the key-value style for environments to prevent human errors (#840) 2021-11-09 20:29:22 +01:00
GOVERNANCE.md docs(governance): Project Governance Change (#2174) 2023-02-17 23:10:39 +01:00
LICENSE.md Update references of mosaic to Zellij in md files 2021-02-10 12:12:19 +05:30
Makefile.toml Makefile: Fix CI ordering/dependencies (#2004) 2022-12-09 11:06:11 +00:00
README.md Add 'launch in xonsh' in README (#2323) 2023-03-30 11:14:51 +02:00
rust-toolchain.toml Bump rust version to 1.75.0 (#3039) 2024-01-08 16:56:01 +00:00


logo
Zellij

Discord Chat Matrix Chat Zellij documentation

demo

[Installation] [Screencasts & Tutorials] [Configuration] [Layouts] [FAQ]

What is this?

Zellij is a workspace aimed at developers, ops-oriented people and anyone who loves the terminal. Similar programs are sometimes called "Terminal Multiplexers".

Zellij is designed around the philosophy that one must not sacrifice simplicity for power, taking pride in its great experience out of the box as well as the advanced features it places at its users' fingertips.

Zellij is geared toward beginner and power users alike - allowing deep customizability, personal automation through layouts, true multiplayer collaboration, unique UX features such as floating and stacked panes, and a plugin system allowing one to create plugins in any language that compiles to WebAssembly.

You can get started by installing Zellij and checking out the Screencasts & Tutorials.

For more details about our future plans, read about upcoming features in our roadmap.

How do I install it?

The easiest way to install Zellij is through a package for your OS.

If one is not available for your OS, you could download a prebuilt binary from the latest release and place it in your $PATH. If you'd like, we could automatically choose one for you.

You can also install (compile) with cargo:

cargo install --locked zellij

Try Zellij without installing

bash/zsh:

bash <(curl -L zellij.dev/launch)

fish/xonsh:

bash -c 'bash <(curl -L zellij.dev/launch)'

How do I get involved?

Zellij is a labour of love built by an enthusiastic team of volunteers. We eagerly welcome anyone who would like to join us, regardless of experience level, so long as they adhere to our Code of Conduct.

Please report any code of conduct violations to aram@poor.dev

To get started, you can:

  1. Take a look at the Issues in this repository - especially those marked "good first issue". Those with the "help wanted" tag probably don't have anyone else working on them.
  2. Drop by our Discord, or Matrix chat and ask what you can work on, or how to get started.
  3. Open an issue with your idea(s) for the project or tell us about them in our chat.

How do I start a development environment?

  • Clone the project
  • In the project folder, for debug builds run: cargo xtask run
  • To run all tests: cargo xtask test

For more build commands, see CONTRIBUTING.md.

Configuration

For configuring Zellij, please see the Configuration Documentation.

What is the current status of the project?

Zellij should be ready for everyday use, but it's still classified as a beta. This means that there might be a rare crash or wrong behaviour here and there, but that once found it should be fixed rather quickly. If this happens to you, we would be very happy if you could open an issue and tell us how to reproduce it as best you can.

Roadmap

Presented here is the project roadmap, divided into three main sections.

These are issues that are either being actively worked on or are planned for the near future.

If you'll click on the image, you'll be led to an SVG version of it on the website where you can directly click on every issue

roadmap

License

MIT