* Read pane name from layout
* Update pane name at runtime
* Fix tests
* prefer and render pane name over pane title
* fix clippy errors
* fix after rebase
* feat(status-bar): add draft for multiple tips
* feat: add TIPS_MAP
* Simplified 'tip' function.
* chore: update file structure
* feat(status-bar): update method of Tip rendering
* feat(status-bar): change type of tip in State
* refactor(status-bar): related to random tip selection
* feat(status-bar): add simple local cache for testing
* feat(status-bar): add cache system for tip data
* Add mpadir to wasm for plugin to access zellij temp folder.
* refactor(status-bar): update cache and utils
* fix(status-bar): update file read error
* refactor(status-bar): update macros
* chore(status-bar): delete test data
* chore(status-bar): update missing fixes
* feat(status-bar): add detailed error
* style: make clippy
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
* 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
* 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
* 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
* 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'
```
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
* 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>
* 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>
* 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
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.
* 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
* 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
* 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.
* 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
* 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>
* 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
* 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>
Every plugin will have following two directories for its use:
`./data`: Plugin's own data should be saved here, every plugin will have its own directory.
`/host/`: All plugins have access to this directory, it defaults to the current working directory of Zellij.
Signed-off-by: Tw <tw19881113@gmail.com>
There are different reasons leading the server thread exits,
currently we only release the cached session data when client
exits normally. This fix covers all the cases.
Signed-off-by: Tw <tw19881113@gmail.com>
fixes#727
Inheriting the current working directory didn't work when switching
between tabs. This happened because the event to notify the pty of an
pane change was triggered when setting the active pane inside of the
current tab, but switching between tabs will only cause a re-render of
the newly selected tab and it's panes without setting the active pane.
This was fixed by moving the event to notify the pty of the pane change
into the tabs render method.
Co-authored-by: Jesse Tuchsen <not@disclosing>
* fix(wrap): do not wrap empty lines and properly place cursor when resizing
* fix(wrap): truncate last blank line wraps
* fix(wrap): truncate lines right after unwrapping them
* refactor(grid): remove unused method
* docs(changelog): document change
* feat(cwd-pane): Add a new trait to get the cwd of a given pid
Co-authored-by: Quentin Rasmont <qrasmont@gmail.com>
* feat(cwd-pane): Allow for setting the cwd when spawning a new terminal
Co-authored-by: Quentin Rasmont <qrasmont@gmail.com>
* feat(cwd-pane): Add an active_pane field to the Pty struct
Co-authored-by: Quentin Rasmont <qrasmont@gmail.com>
* feat(cwd-pane): Update Pty with Tab's active pane id
Co-authored-by: Quentin Rasmont <qrasmont@gmail.com>
* feat(cwd-pane): Refactor spawn_terminal to use cwd by default
Co-authored-by: Quentin Rasmont <qrasmont@gmail.com>
* feat(cwd-pane): Fix tests and lints
Co-authored-by: Quentin Rasmont <qrasmont@gmail.com>
* feat(cwd-pane): Fix formatting
* feat(cwd-pane): Refactor child pid fetching to handle errors better
Instead of panicking when transfering the process id of the forked child
command we just return an empty process id.
* feat(cwd-pane): Add non Linux/MacOS targets for the get_cwd method.
This will allow Zellij to compile on non Linux/MacOS targets without
having an inherited cwd.
* feat(cwd-pane): Refactor spawn_terminal method to use ChildId struct.
The spawn_terminal methods been refactored to use the ChildId struct in
order to clarify what the Pid's returned by it are. The documentation
for the ChildId struct was improved as well.
* feat(cwd-pane): Fix tests/lints
Co-authored-by: Jesse Tuchsen <not@disclosing>
Co-authored-by: Quentin Rasmont <qrasmont@gmail.com>
* work
* fix(frame): properly handle widechars in frame titles
* style(fmt): make rustfmt happy
* fix(truncate): do not reverse second part of string (oops)
* docs(changelog): document change
* refactor(panes): move to parametric pane sizes
* Fixed the simpler errors by casting to usize
* The least I can do is pass the formatting check...
* Move to stable toolchain
* Well, it compiles?
* And now it doesn't! ;)
* Baseline functionality with the new Dimension type
* Working POC for percent-based resizing
* REVERT THIS COMMIT – DELETES TESTS
* Perfected the discrete resize algorithm
* Fixed fixed-size panes
* Basic bidirectional resize
* feat(resize): finalised parametric resize algorithm
* Reduce the logging level a bit
* Fixed nested layouts using percents
* Bug squishing for implicit sizing
* Here is a funky (read: rubbish) rounding approach
* And now it's gone again!
* Improve discretisation algorithm to fix rounding errors
* Fix the last layout bug (maybe?)
* Mixed explicit and implied percents work now
* Let's pretend that didn't happen...
* Make things a bit less crashy
* Crash slightly more for now (to find bugs)
* Manaually splitting of panes works now
* Start moving to percent-based resizes
* Everything but fullscreen seems to be working
* Fix compilatation errors
* Culled a massive amount of border code
* Why not pause to please rustfmt?
* Turns out I was still missing a few tests...
* Bringing back even more tests!
* Fix tests and pane boarders
* Fix the resize system without gaps
* Fix content offset
* Fixed a bug with pane closing
* Add a hack to fix setting of the viewport
* Fix toggling between shared borders and frames
* fix(tests): make e2e properly use PaneGeom
* style(fmt): make rustfmt happy
* Revert unintentional rounding of borders
* Purge some old borderless stuff
* Fix busted tab-bar shrinking
* Update E2E tests
* Finish implementing fullscreen!
* Don't crash anymore?
* Fix (almost) all tests
* Fix a lack of tab-stops
* All tests passing
* I really can't be bothered to debug a CI issue
* Tie up loose ends
* Knock out some lingering FIXMEs
* Continue to clean things up
* Change some naming and address FIXMEs
* Cull more code + FIXMEs
* Refactor of the resize system + polish
* Only draw frames when absolutely necessary
* Fix the tab-bar crash
* Fix rendering of boarders on reattach
* Fix resizing at small pane sizes
* Deduplicate code in the layout system
* Update tab-bar WASM
* Fixed the pinching of panes during resize
* Unexpose needlessly public type
* Add back a lost test
* Re-add tab tests and get them to compile
* All tabs need layouts
* Start fixing tests + bug in main
* Stabilize the resize algorithm rounding
* All tests from main are now passing
* Cull more dead code
* adjust example layouts and move them from `./example` to
`./example/layouts`
* simplify the deserialization of the layout
* layouts are now constructed as follows:
```
---
template:
direction: Horizontal
parts:
- direction: Vertical
borderless: true
split_size:
Fixed: 1
run:
plugin: tab-bar
- direction: Vertical
body: true # <== The body section specifies the position of the
# inserted tab
- direction: Vertical
borderless: true
split_size:
Fixed: 2
run:
plugin: status-bar
tabs:
- direction: Vertical
- direction: Vertical
```