Commit Graph

186 Commits

Author SHA1 Message Date
Aram Drevekenin
1ee743156c chore(version): bump development version 2021-11-29 10:09:22 +01:00
Jae-Heon Ji
c349586d84
feat: provide the zellij version to plugins (#894)
* feat: add draft of feature

* feat(wasm): add plugin API for getting of zellij version

* feat(wasm): update feedback

* delete unnecessary function
2021-11-26 10:44:43 +01:00
Aram Drevekenin
6c6a4393f4
This adds a UI for multiple users in panes (behind a feature flag) (#897)
* feat(ui): multiple users in panes

* style(fmt): make rustfmt happy

* style(fmt): make clippy happy
2021-11-25 16:21:59 +01:00
Thomas Linford
a96b9d8769
feat(compatibility): add support for osc 8 escape code (#822)
Resolve #645 

* add support for osc 8 escape code

* refactor, add links to CharacterStyles

* cleanup

* refactor, add minimal tests
2021-11-22 18:54:49 +01:00
Thomas Linford
707fedd1df
fix(performance): keep track of scrollback buffer size (#881)
Fix #877. Avoid calculating scrollback buffer size on each render, since the calculation becomes slower proportionally to the amount of lines buffered, and to the width of each line.
* wip: keep track of scrollback buffer size

* account for lines dropped by bounded_push

* fix: use saturating sub

* fix: account for 0 width lines

* remove log messages
2021-11-22 18:34:45 +01:00
a-kenji
198950e0b9
add(overlay): add overlay (#875)
* add overlay instructions to the `render` function

  this is a continuation of #871
2021-11-17 00:12:34 +01:00
a-kenji
b861baa6a1
First attempt to provide an overlay prompt (#871) 2021-11-15 20:13:05 +01:00
Thomas Linford
0ba8e2f7b4
Simplify terminal character style diff (#839)
* optimize EMPTY_TERMINAL_CHARACTER diff

return a diff for EMPTY_TERMINAL_CHARACTER only when necessary (when new_styles different than current), so to avoid
emitting a ansi reset code every time.

* simply character styles diffing logic
2021-11-15 08:31:53 +01:00
Thomas Linford
44852cd6b2
refactor(tab): close_pane returns closed pane (#853)
* refactor(tab): close_pane returns closed pane

Prepare for break pane command by making close_pane return the closed
pane. Also split the function up to hopefully be more readable.

* more refactoring
2021-11-13 21:51:53 +01:00
Aram Drevekenin
bd795a3e9f
refactor(tabs): lay down infrastructure for multiple users (#864)
* refactor(screen): support multiple mirrored clients

* style(fmt): make rustfmt happy

* style(clippy): make clippy happy

* whitespace

* github, y u no update CI?!

* is this a cache issue?

* is it the checkout cache?

* no cache at all?

* Debug

* fix gototab

* decoment

* gototab none in wasm_vm

* gototab none in wasm_vm

* the fun never ends

* tests(e2e): update infra and add multiple user mirroring test

* refactor(tab): change structs in tabs and terminal panes to support multiple users

* style(fmt): make rustfmt happy

* style(fmt): make clippy happy
2021-11-12 17:22:14 +01:00
Thomas Linford
8a4161ee5b
fix(compatibility): CSI cursor next line fix (#863)
Move cursor to beginning of line after moving it down.

fixes #860.
2021-11-11 21:24:59 +01:00
a-kenji
bd8c834d7c
fix(options): handling and overwriting cli opts (#859)
* fix(options): handling ond verwriting cli opts

* previously it was only possible to turn off certain features with a
  command line option, now it is possible to also overwrite this
  behavior in a sane way, for that some breaking changes happened:

  following options got renamed and inverted:
  ```
  disable_mouse_mode -> mouse_mode
  no_pane_frames -> pane_frames
  ```

  following cli options got added:
  ```
  mouse-mode [bool]
  pane-frames [bool]
  simplified-ui [bool]
  ```

  the following cli flag got removed:
  ```
  simplified-ui
  ```

  They can be specified in the following way:
  ```
  zellij options --mouse-mode true
  ```
  in order to enable the mouse mode, even if it is turned off in the
  config file:
  ```
  mouse_mode: false
  ```

  The order is now as follows:
  1. corresponding flag (`disable-mouse-mode`)
  2. corresponding option (`mouse-mode`)
  3. corresponding config option (`mouse_mode`)

* add: options and flags for the same value conflict

* example:
  ```
  zellij options --mouse-mode true --disable-mouse-mode`
  ```
  ```
  $ error: The argument '--mouse-mode <mouse-mode>' cannot be used with '--disable-mouse-mode'
  ```
2021-11-11 17:13:34 +01:00
Aram Drevekenin
26bd80be2d chore(version): bump development version 2021-11-10 18:01:56 +01:00
Aram Drevekenin
0fec10b08b chore(release): v0.20.1 2021-11-10 17:54:39 +01:00
a-kenji
abbe3b237a
add(feature): toggle boolean options with cli flag (#855)
add the ability to toggle boolean options with a cli flag:

example:
    if the pane frames are turned off in the config file,
    then passing in the `--no-pane-frames` flag will toggle the
    pane frames on
2021-11-10 13:31:37 +01:00
Ken Matsui
6d60d83e58
fix(envs): Unify operation of Zellij environment variables (#842) 2021-11-10 09:02:17 +01:00
Aram Drevekenin
b232326dc2 chore(version): bump development version 2021-11-08 15:42:46 +01:00
oromate
8f06f119fd
feat(scrolling): half-page scroll actions (#813)
* Half-page scroll actions #794

* fix(performance): do not hang when resizing large line wraps (#814)

* fix(performance): do not hang when resizing large line wraps

* style(fmt): make rustfmt happy

* style(clippy): make clippy happy

* docs(changelog): scroll fix

* fix(compatibility): home and end key fix (#815)

* fix(compatibility): handle home/end keys properly from terminfo

* style(fmt): make rustfmt happy

* style(fmt): remove unused import

* docs(changelog): home end key fix

* docs(changelog): fix link

* fix(typo): Correct typo from `occured` to `occurred` (#821)

* docs(changelog): fix a typo

* fix(docs): fix wrong arguments for `cargo make run` given in CONTRIBUTING.md (#819)

* docs(changelog): update `cargo-make` for `v0.35.3`

* fix(warning): Fix an unused import warning of std::fs on macos (#820)

* docs(changelog): fix unused import on darwin

* add: `WriteChars` action (#825)

* Behaves like the `Write` action, but one can specify
  strings themselves instead of their bytecodes.

  Usage:

  WriteChars: "cargo make test",

* docs(changelog): Add `WriteChars` action

* fix(docs): Fix a typo and some grammatical errors in bug_report.md (#826)

* docs(changelog): fix typo bug_report template

* add: `rust-version` (msrv) field to `Cargo.toml` (#828)

* specifies the minimum version the package can be compiled with,
  may be ignored with `--ignore-rust-version` option

  ref: https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-rust-version-field

* docs(changelog): add `rust-version` to `Cargo.toml`

* fix(unix): forkpty => openpty (#830)

* fix(unix): forkpty => openpty

* style(fmt): make rustfmt happy

* docs(changelog): forkpty => openpty

* Fix: move `colors_transform` to `colorsys` (#832)

* `colors_transform` is deprecated and superceded by `colorsys`

  ref: https://crates.io/crates/colors-transform

* docs(changelog): `colors_transform` to `colorsys`

* feat(ui): add right-click support to plugins

* chore(docs): update changelog

* chore(warnings): remove unused imports (#833)

* rename var sroll_rows and review snapshots

* style(fmt): make rustfmt happy

Co-authored-by: Aram Drevekenin <aram@poor.dev>
Co-authored-by: Ken Matsui <26405363+ken-matsui@users.noreply.github.com>
Co-authored-by: a-kenji <aks.kenji@protonmail.com>
Co-authored-by: Tw <tw19881113@gmail.com>
Co-authored-by: Brooks Rady <b.j.rady@gmail.com>
2021-11-08 15:05:47 +01:00
Henil Dedania
4ac9344085
feature(resize): Non directional resize (#520)
* feature(resize): Non directional resize

* Implement special cases

* fix resizing for panes that have `+` cross section

* fix resizing for panes that have `T` cross section

* fix panics

* Add Nondirection resize keys to plugin

* fix formatting

* fix: clippy warnings

* fix the last edge case

* implemented some of the suggested changes

* Remove helper function and elevate comment to top of function

* Use `=` to keep it consistent with Normal mode mapping as its easier to use

* Remove extra reference borrowing

* fix an edge case

* add test for nondirectional resize increase/decrease

* fix(controls): add + to resize

* refactor(resize): simplify methods

* fix(resize): properly resize opposite corner pane

Co-authored-by: Aram Drevekenin <aram@poor.dev>
2021-11-05 09:29:45 +01:00
Aram Drevekenin
23c9751346
fix(resize): do not ignore minimums when doing directional resizes (#838)
* fix(resize): do not ignore minimums when doing directional resizes

* style(fmt): make rustfmt happy
2021-11-04 23:19:38 +01:00
Aram Drevekenin
daa70022c9
fix(cwd): open pane in cwd even if default shell is explicit (#834)
* fix(cwd): open pane in cwd even if default shell is explicit

* style(fmt): make rustfmt happy
2021-11-03 17:59:28 +01:00
a-kenji
a83a8b9a96
chore(warnings): remove unused imports (#833) 2021-11-03 14:31:06 +01:00
Tw
9ea3dc0dbe
feat(ui): add right-click support to plugins 2021-11-02 18:49:10 +00:00
Aram Drevekenin
a14a2f6fb0
fix(unix): forkpty => openpty (#830)
* fix(unix): forkpty => openpty

* style(fmt): make rustfmt happy
2021-11-01 22:01:59 +01:00
a-kenji
d2b81293df
add: WriteChars action (#825)
* Behaves like the `Write` action, but one can specify
  strings themselves instead of their bytecodes.

  Usage:

  WriteChars: "cargo make test",
2021-11-01 08:52:55 +01:00
Ken Matsui
f04a7a4ee7
fix(warning): Fix an unused import warning of std::fs on macos (#820) 2021-10-31 20:45:52 +01:00
Aram Drevekenin
42b66644ae
fix(performance): do not hang when resizing large line wraps (#814)
* fix(performance): do not hang when resizing large line wraps

* style(fmt): make rustfmt happy

* style(clippy): make clippy happy
2021-10-29 12:22:30 +02:00
Brooks Rady
6bb1ec6636
fix(perf): plugins are only compiled once 2021-10-26 18:43:17 +01:00
Aram Drevekenin
685b51efbb
fix(compatibility): improve handling of wide characters inserted in the middle of existing lines (#806)
* fix(compatibility): handle wide characters inserted in line middle

* fix(compatibility): more wide char handling

* style(fmt): make rustfmt happy

* style(fmt): make clippy happy

* style(fmt): make clippyt happy

* style(fmt): make rustfmt happy... again
2021-10-26 16:43:56 +02:00
Kunal Mohan
164eb6a5b7
Feature: Rotate Pane locations (#802)
fix #165
2021-10-26 09:54:05 +05:30
Alexandre Courbot
21380c278e
fix(performance): immediately render after a period of inactivity (#798)
The current code waits for 30ms after reading new data to refresh the
screen in order to batch input together. This reduces the number of
refreshes, but also adds perceptible latency as keystrokes will only get
visual feedback after a 30 ms delay.

Improve this by immediately refreshing if more than 30ms have already
passed since the last refresh. That way punctual events like keystrokes
get immediate feedback, while heavier input still gets batched together.
2021-10-25 16:51:30 +02:00
Brooks J Rady
e0d7212c2a chore(rust): move to 2021 edition
Get with the times, kiddo (and all hail disjoint captures)
2021-10-22 02:21:16 +01:00
Aram Drevekenin
3b2d8f692c chore(version): bump development version 2021-10-20 15:00:32 +02:00
Aram Drevekenin
a99354a155
refactor(screen): more multiple-users groundwork (#788)
* refactor(screen): support multiple mirrored clients

* style(fmt): make rustfmt happy

* style(clippy): make clippy happy

* whitespace

* github, y u no update CI?!

* is this a cache issue?

* is it the checkout cache?

* no cache at all?

* Debug

* fix gototab

* decoment

* gototab none in wasm_vm

* gototab none in wasm_vm

* the fun never ends

* style(fmt): make rustfmt happy
2021-10-20 10:37:38 +02:00
Kunal Mohan
d90e3d4cac
Feature: Move panes directionally (#762)
* Feature: Move panes directionally

* change keybinds

* Fix active pane after move

* Add a separate 'Move' mode

* Add tests

* Add more tests

* Send resize message to pty

* wrap set_terminal_size_using_fd() in macro

* change keybind for Move mode

* cargo fmt

* fix test

* move render functions from tab.rs to screen.rs

* undo wrong keybinds
2021-10-19 20:20:28 +05:30
Thomas Linford
76a96b538b
logging: remove unused log functions, change log file const to new file (#779) 2021-10-18 10:52:58 +02:00
Brooks J Rady
b94b25c5fe fix(plugin): clean up the mouse PR a little 2021-10-12 23:11:23 +01:00
qepasa
0710594588
feat(plugin): Add mouse events for plugins (#629)
* feat(plugin): Add mouse events for plugins

* Add double click support in strider

* Add support for mouse clicks in tab-bar and fix bug in strider with selecting past the list of files and random double click action

* continue working on mouse support for tab bar

* finish tab change

* fix fmt and fix bug in strider double-click

* fix clippy

* cleanup dbgs and logs

* fix clippy

* noop change to rerun e2e tests

* Rebase and fix mouse click behavior in tab-bar and strider after rebase

* fix fmt

* remove dbgs and and comment in tab-line/main.rs

* cargo fmt

* Code review suggestions

* rebase fix

* fix clippy

* fix mouse selection for tabs in tab-bar
2021-10-12 22:37:54 +01:00
Thomas Linford
45af3e4279
Preserve current umask (#777)
* preserve umask when starting server

* make sure log files are created with explicit permissions
2021-10-12 18:11:16 +05:30
Jae-Heon Ji
0ca5c18729
feat(cli): add kill-session command (#745)
* feat: add kill-session command

* style: apply formatting rules

* feat: add new instruction for kill-session

* feat: update feedback of kill-session

* separation of command `kill-session` and `kill-all-sessions` function.
* Add information to various situations
* Add a question (yes or no) when executing the `kill-all-sessions`
  command.

* chore: adjust clippy warning

* fix warning wording

* make rustfmt happy

Co-authored-by: Aram Drevekenin <aram@poor.dev>
2021-10-11 16:57:56 +02:00
Aram Drevekenin
f2401d0b25
refactor(clients): support multiple clients in tab/screen rendering infra (#770) 2021-10-07 15:22:20 +02:00
Thomas Linford
04fb9de8fa
make sure tabs are updated when closing panes (#757)
* call update_tabs on closing panes

* screen: avoid explit render after update_tabs

update_tabs causes a render anyway, by updating plugins, and after that
a render is requested.
2021-10-07 13:41:06 +02:00
Kunal Mohan
3c05f26802
Fix(scroll): Prevent scroll buffer overwrite (#655)
* fix #306: Buffer new vte events when pane is scrolled up

* Exit scroll mode after pressing [Enter] once

* clear scroll of active pane when changing from scroll mode to normal or locked mode

* Increase render interval
2021-10-01 22:20:13 +05:30
Aram Drevekenin
79fa3594e3 chore(version): bump development version 2021-09-30 11:39:04 +02:00
Aram Drevekenin
3df362d046 chore(version): bump development version 2021-09-30 11:13:33 +02:00
Aram Drevekenin
8d72013d4d chore(version): bump development version 2021-09-29 15:23:22 +02:00
Aram Drevekenin
fb8e44b8a8
fix(compatibility): scroll lines into scrollback when clearing screen (#747)
* fix(compatibility): scroll lines into scrollback when clearing screen

* fix(tests): silently fail on channel close error
2021-09-28 16:44:26 +02:00
Aram Drevekenin
8b3287c452
fix(compatibility): handle cursor movements outside scroll region (#746)
* fix(compatibility): handle cursor movements outside scroll region

* style(fmt): make clippy happy
2021-09-28 15:41:32 +02:00
Kaito Akita
4632e90b73
feat(ui): The status bar indicates that the panes are full screen and how many hidden panes are (#450)
* fix(ui): offset content after viewport construction

* Added the feature to display fullscreen information on the second line of the status-bar.

* fix(strider): update host mount-point

* fix(plugin): create missing data directories as needed

* feat(layout): specify only tab name in `tabs` section (#722)

Allow specifying only the tab name in the `tabs` section

- For example this is now possible:
```
tabs:
  - name: first
    parts:
      - direction: Vertical
      - direction: Vertical
  - name: second
  - name: third
```
  For that the tab section defaults the direction to
  `direction::Horizontal`

- Adds an error upon specifying a tab name inside the `parts` section
  of the tab-layout

* docs(changelog): Solely name tab in `tabs` section

* feature(release): Copy default config to the examples folder on release (#736)

fixes #733

* docs(changelog): Copy example config on release

* Update default config (#737)

* feat(plugin): add manifest to allow for plugin configuration (#660)

* feat(plugins-manifest): Add a plugins manifest to allow for more configuration of plugins

* refactor(plugins-manifest): Better storage of plugin metadata in wasm_vm

* fix(plugins-manifest): Inherit permissions from run configuration

* refactor(plugins-manifest): Rename things for more clarity

- The Plugins/Plugin structs had "Config" appended to them to clarify
  that they're metadata about plugins, and not the plugins themselves.

- The PluginType::OncePerPane variant was renamed to be just
  PluginType::Pane, and the documentation clarified to explain what it
  is.

- The "service" nomenclature was completely removed in favor of
  "headless".

* refactor(plugins-manifest): Move security warning into start plugin

* refactor(plugins-manifest): Remove hack in favor of standard method

* refactor(plugins-manifest): Change display of plugin location

The only time that a plugin location is displayed in Zellij is the
border of the pane. Having `zellij:strider` display instead of just
`strider` was a little annoying, so we're stripping out the scheme
information from a locations display.

* refactor(plugins-manifest): Add a little more documentation

* fix(plugins-manifest): Formatting

Co-authored-by: Jesse Tuchsen <not@disclosing>

* chore(docs): update changelog

* feat(sessions): mirrored sessions (#740)

* feat(sessions): mirrored sessions

* fix(tests): input units

* style(fmt): make rustfmt happy

* fix(tests): make mirrored sessions e2e test more robust

* refactor(sessions): remove force attach

* style(fmt): rustfmtify

* docs(changelog): update change

* fix(e2e): retry on all errors

Co-authored-by: Brooks J Rady <b.j.rady@gmail.com>
Co-authored-by: a-kenji <aks.kenji@protonmail.com>
Co-authored-by: spacemaison <tuchsen@protonmail.com>
Co-authored-by: Jesse Tuchsen <not@disclosing>
Co-authored-by: Aram Drevekenin <aram@poor.dev>
2021-09-27 12:07:28 +02:00
Aram Drevekenin
5c54bf18c2
feat(sessions): mirrored sessions (#740)
* feat(sessions): mirrored sessions

* fix(tests): input units

* style(fmt): make rustfmt happy

* fix(tests): make mirrored sessions e2e test more robust

* refactor(sessions): remove force attach

* style(fmt): rustfmtify

* docs(changelog): update change

* fix(e2e): retry on all errors
2021-09-27 11:29:13 +02:00