A terminal workspace with batteries included
Go to file
Thomas Linford f93308f211
feat(ui): initial mouse support (#448)
* Initial mouse support

* enable mouse support (termion MouseTerminal)
* handle scroll up and down events

* Allow enabling/disabling of mouse reporting

Store the mouse terminal on OsInputOutput

* WIP: switch pane focus with mouse

* testing to get mouse character selection

* wip mouse selection

* wip: mouse selection

- initial handling of mouse events for
  text selection within a pane
- wide characters currently problematic
- selection is not highlighted

* highlight currently selected text

* improve get currently selected text from TerminalPane

* copy selection to clipboard (wayland only for now)

* Add missing set_should_render on selection update

* Improve text selection

- Strip whitespace from end of lines
- Insert newlines when selection spans multiple lines

* Simplify selection logic

- Remove Range struct
- Selection is not an Option anymore, it's empty when start == end

* copy selection to clipboard with OSC-52 sequence

* Improve text selection with multiple panes

- Constrain mouse hold and release events to currently active pane
- Fix calculation of columns with side by side panes

* fix for PositionAndSize changes

* Fix mouse selection with full screen pane.

- Transform mouse event positions to relative when passing to pane.

* Move selection to grid, rework highlighting.

- Mark selected lines for update in grid output buffer, for now in the
  simplest way possible, but can be made more efficient by calculating
  changed lines only.
- Clear selection on pane resize.
- Re-add logic to forward mouse hold and release events only to
  currently active pane.

* Tidy up selection

- add method to get selection line range
- add method to sort the current selection

* Grid: move current selection up/down when scrolling

- Make the selection work with lines in lines_above and lines_below
- Todo: update selection end when scrolling with mouse button being held
- Todo: figure out how to move selection when new characters are added.

* Grid: move selection when new lines are added

* Keep track of selection being active

- Handle the selection growing/shrinking when scrolling with mouse
  button held down but not yet released.

* Improve selection end with multiple panes

* Tidying up

- remove logging statements, unused code

* Add some unit tests for selection, move position to zellij-utils

* Change Position::new to take i32 for line

* Grid: add unit tests for copy from selection

* add basic integration test for mouse pane focus

* Add basic integration test for mouse scroll

* Use color from palette for selection rendering

* Improve performance of selection render

- Try to minimize lines to update on selection start/update/end

* fixes for updated start method

* fix lines not in viewport being marked for rendering

- the previous optimization to grid selection rendering was always
adding the lines at the extremes of previous selection, causing problems
when scrolling up or down
- make sure to only add lines in viewport

* Disable mouse mode on exit

* use saturating_sub for usize subtractions

* copy selection to clipboard on mouse release

* disable mouse on exit after error

* remove left-over comments

* remove copy keybinding

* add default impl for selection methods in Pane

- remove the useless methods from Impl Pane in PluginPane

* move line diff between selections to selection

* add option to disable mouse mode

* Allow scrolling with mouse while selecting.

* move action repeater to os_input_output, change timeout to 10ms

- change repeater to take an action instead of a position with hardcoded
action

* replace mouse mode integration tests with e2e tests

* cleanup

* cleanup

* check if mouse mode is disabled from merged options

* fix missing changes in tests, cleanup
2021-07-02 16:40:50 +02:00
.github chore(tests): move all integration tests to be either unit or e2e tests - remove old testing infra (#589) 2021-06-30 11:27:35 +02:00
assets Change layout directory from data to config 2021-06-16 17:09:05 +02:00
default-plugins chore(clippy): needless_borrow 2021-06-29 23:02:51 +02:00
docs docs(manpage): Update manpage 2021-05-30 21:07:44 +02:00
example fixup! Merge branch 'main' of https://github.com/zellij-org/zellij into simple-font-ui 2021-05-10 20:54:39 +02:00
src feat(ui): initial mouse support (#448) 2021-07-02 16:40:50 +02:00
zellij-client feat(ui): initial mouse support (#448) 2021-07-02 16:40:50 +02:00
zellij-server feat(ui): initial mouse support (#448) 2021-07-02 16:40:50 +02:00
zellij-tile chore(release): bump development version 2021-06-04 10:28:03 +01:00
zellij-tile-utils chore(release): bump development version 2021-06-04 10:28:03 +01:00
zellij-utils feat(ui): initial mouse support (#448) 2021-07-02 16:40:50 +02:00
.gitignore clean and exit on window close 2021-05-15 22:18:29 +05:30
Cargo.lock feat(ui): initial mouse support (#448) 2021-07-02 16:40:50 +02:00
Cargo.toml Add e2e tests (#582) 2021-06-21 10:45:18 +02:00
CHANGELOG.md chore(changelog): Add run-command option #596 2021-07-02 14:08:14 +02:00
CODE_OF_CONDUCT.md docs(coc): initial 2020-10-27 11:11:10 +01:00
CONTRIBUTING.md Add new dependencies to CONTRIBUTING.md 2021-06-29 23:19:23 +02:00
docker-compose.yml chore(tests): move all integration tests to be either unit or e2e tests - remove old testing infra (#589) 2021-06-30 11:27:35 +02:00
GOVERNANCE.md Add Kyle to governance.md 2021-04-03 01:42:13 -07:00
LICENSE.md Update references of mosaic to Zellij in md files 2021-02-10 12:12:19 +05:30
Makefile.toml Add e2e tests (#582) 2021-06-21 10:45:18 +02:00
README.md docs(readme): clarifications 2021-05-17 18:21:31 +02:00
rust-toolchain feat(ci): add CI trigger for manual builds 2021-04-26 18:58:42 +01:00


logo
Zellij

demo

Discord Chat

What is this?

Zellij is a workspace aimed at developers, ops-oriented people and anyone who loves the terminal. At its core, it is a terminal multiplexer (similar to tmux and screen), but this is merely its infrastructure layer.

Zellij includes a layout system, and a plugin system allowing one to create plugins in any language that compiles to WebAssembly.

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

Zellij was initially called "Mosaic".

How do I install it?

You can install it through cargo:

cargo install zellij

Or you can download a prebuilt binary from our Releases.

The default plugins make use of characters that are mostly found in nerdfonts. To get the best experience either install nerdfonts, or use the simplified ui by starting Zellij with zellij options --simplified-ui, or putting simplified_ui: true in the config file.

How do I hack on it? (Contributing)

  • Clone the project
  • Install cargo-make with cargo install --force cargo-make
  • In the project folder, for debug builds run: cargo make run
  • To run all tests: cargo make 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.

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.

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 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.

And most importantly, please read our code of conduct.

Roadmap

This section contains an ever-changing list of the major features that are either currently being worked on, or planned for the near future.

  • A web client/server - Connect to Zellij through the browser instead of opening a terminal window. Either on a local or remote machine.
  • Share sessions with others - See the focused window and cursor of other users, work on a problem or a code base together in real time.
  • Support for multiple terminal windows across screens - Transfer panes across different windows and screens by having them all belong to the same session.
  • Smart layouts - expand the current layout system so that it rearranges and hides panes intelligently when new ones are added or the window size is changed.

License

MIT