Commit Graph

38 Commits

Author SHA1 Message Date
msirringhaus
bae1548495
feat(terminal): search panes (#1521)
* WIP: First draft of searching in panes.

* Add ability to highlight search-results in viewport and move forwards/backwards

* Clear search results when leaving search

* Search newly scrolled in lines and have live-search when entering search-term

* search_forward/backward() now doesn't get the needle again, since we already know it

* Use red and yellow from theme. No idea if we should introduce new 'search'-colors

* Implement moving the viewport for searches outside the current one.

* Implement hacky case-insensitivity (ASCII only at the moment)

* Implement wrap-search and prepare infrastructure for whole-word search

* Add a bunch of tests and an embarrasing amount of bugfixes

* Remember search selection when toggling case-sensitivity (if possible)

* New tab integration tests and make search work with floating panes

* Make highlights work with resize (not keeping the active-selection in most cases)

* Switch the search-algo a bit in order to make multi-line search work

* Don't forget active selection when nothing more is found, reflow found selections and scroll correctly

* Make all search-related function calls in plugin-pane No-ops

* Activate whole word search (ASCII only)

* Run cargo fmt

* Make clippy happy

* Remove unneeded transferred_rows_count

* Remove boilerplate and use macro instead

* Add explanatory comments

* Move search-related functions into SearchResults impl and try to remove duplicate code

* Move clearing of search-results upon mode-switch to appropriate place

* Jump to the first occurence while typing (EnterSearch), if none is found in the current viewport

* Always show needle and also show search modifiers in pane title

* Integration tests now use correct InputMode, so we can test the pane title when doing searches

* Move no-op implementation of search-functions from plugin-pane to pane-trait

* Move SearchResult to its own file

* Try to clean up search_row() a bit

* Make clippy happy

* fix: various typos (#1553)

Because they were wrong.

* flake.lock: Update (#1554)

Flake lock file updates:

• Updated input 'crate2nix':
    'github:kolloch/crate2nix/805cdaf084c859c2ea0c084b74f4527b0483f6aa' (2022-06-17)
  → 'github:kolloch/crate2nix/91f333aca414ee346bc5bdea76fe9938f73a15f9' (2022-07-01)
• Updated input 'flake-utils':
    'github:numtide/flake-utils/1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1' (2022-05-30)
  → 'github:numtide/flake-utils/bee6a7250dd1b01844a2de7e02e4df7d8a0a206c' (2022-06-24)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/3d7435c638baffaa826b85459df0fff47f12317d' (2022-06-16)
  → 'github:nixos/nixpkgs/0ea7a8f1b939d74e5df8af9a8f7342097cdf69eb' (2022-07-02)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/da04f39d50ad2844e97a44015048c2510ca06c2f' (2022-06-18)
  → 'github:oxalica/rust-overlay/bbba5e73a21c8c67d5fe1d4d8b3fde60ab6946cd' (2022-07-03)

* fix: fallback to default values when terminal rows/cols are 0 (#1552)

* fix: fallback to default values when terminal rows/cols = 0

* increase retry_pause for failing test

* e2e: load fixtures with cat

* use variable for fixture path

* docs(changelog): fix 0 rows or cols crash

* fix(ci): clippy (#1559)

Install `cargo-make` explicitly in the workflow,
even tough it should be cached from the previous steps.

There are some corner cases in which gh messes the caching up
and can't access it.

* add(nix): add `compact-bar` to the flake outputs (#1560)

The compact bar wasn't an output yet.

* refactor(crates): move shared contents from zellij tile to zellij utils (#1541)

* zellij-tile: Move `data` to zellij-utils

The rationale behind this is that all components of zellij access the
data structures defined in this module, as they define some of the most
basic types in the application. However, so far zellij-tile is treated
like a separate crate from the rest of the program in that it is the
only one that doesn't have access to `zellij-utils`, which contains a
lot of other data structures used throughout zellij.

This poses issues as discussed in
https://github.com/zellij-org/zellij/pull/1242 and is one of the reasons
why the keybindings in the status bar default plugin can't be updated
dynamically. It is also the main reason for why the keybindings are
currently passed to the plugin as strings: The plugins only have access
to `zellij-tile`, but since this is a dependency of `zellij-utils`, it
can't import `zellij-utils` to access the keybindings.
Other weird side-effect are that in some places `server` and `client`
have to access the `zellij-tile` contents "through" `zellij-utils`, as
in `use zellij_utils::zellij_tile::prelude::*`.

By moving these central data structures to one common shared crate
(`zellij-utils`), `zellij-tile` will be enabled to import `zellij-utils`
like `screen` and `client` already do. This will, next to other things,
allow dropping a lot of `std::fmt::Fmt` impls needed to convert core
data structures into strings and as a consequence, a lot of string
parsing in the first place.

* utils: Integrate new `data` module, bump rust ver

Integrates the `data` module that was previously part of `zellij-tile`
to allow sharing the contained data structures between all components of
zellij.

This allows `zellij-tile` to use `utils` as a dependency. However, since
`tile` is build against the wasm target, it cannot include all of
`zellij-utils`, since a lot of dependencies there cannot compile with
`wasm` as target (Examples include: termwiz, log4rs, async-std). Thus we
make all the dependencies that cannot compile against `wasm` optional
and introduce a new feature `full` that will compile the crate with all
dependencies. Along with this, modify `lib.rs` to include most of the
data structures only when compiling against the `full` feature.

This makes the compiles of `zellij-tile` lighter, as it doesn't include
all of `utils`. As a side effect, due to the dependency notation for the
optional dependencies (See
https://doc.rust-lang.org/cargo/reference/features.html#optional-dependencies),
we bump the rust toolchain version to 1.60.0.

* tile: Import `data` from zellij-utils

Add `zellij-utils` as a dependency to `zellij-tile` and allow us access
to the `data` module defined there. Update the re-export in the
`prelude` such that from all of the plugins points of view *absolutely
nothing changes*.

* utils: Fix `data` module dependency

Since the `data` module has been migrated from `zellij-tile` to
`zellij-utils`, we import it from `zellij-utils` directly now.
Also unify the imports for the `data` module members: We import all of
the through `data::` now, not through a mixture of `data::` and
`prelude::`.

* client: Fix `data` module dependency

Since the `data` module has been migrated from `zellij-tile` to
`zellij-utils`, we import it from `zellij-utils` directly now.
Also unify the imports for the `data` module members: We import all of
the through `data::` now, not through a mixture of `data::` and
`prelude::`.
Add the "full" feature flag to the `zellij-utils` dependency so it
includes all the components we need.

* server: Fix `data` module dependency

Since the `data` module has been migrated from `zellij-tile` to
`zellij-utils`, we import it from `zellij-utils` directly now.
Also unify the imports for the `data` module members: We import all of
the through `data::` now, not through a mixture of `data::` and
`prelude::`.
Add the "full" feature flag to the `zellij-utils` dependency so it
includes all the components we need.

* tests: Fix `data` module dependency

Since the `data` module has been migrated from `zellij-tile` to
`zellij-utils`, we import it from `zellij-utils` directly now.

* utils: Remove "full" feature

in favor of conditional compilation using `target_family`. Replace the
rust 1.60 method of specifying optional dependencies based on features
and optionally include the dependencies only when not building for wasm
instead. (I.e. `cfg(not(target_family = "wasm"))`)

* cargo: Update module dependencies

since `client`, `server` and `tile` now all depend on `utils` only.

* docs(changelog): crate refactor

* fix: typo (#1567)

* feat(terminal): sixel support (#1557)

* work

* work

* work

* work

* work

* more work

* work

* work

* work

* hack around stdin repeater

* refactor(sixel): rename sixel structs

* feat(sixel): render text above images

* fix(sixel): reap images once they're past the end of the scrollbuffer

* fix(sixel): display images in the middle of the line

* fix(sixel): render crash

* fix(sixel): react to SIGWINCH

* fix(sixel): behave properly in alternate screen mode

* fix(sixel): reap images on terminal reset

* feat(sixel): handle DECSDM

* fix(terminal): properly respond to XTSMGRAPHICS and device attributes with Sixel

* Add comment

* fix(sixel): hack for unknown event overflow until we fix the api

* feat(input): query terminal for all OSC 4 colors and respond to them in a buggy way

* fix(sixel): do not render corrupted image

* feat(input): improve STDIN queries

* fix(client): mistake in clear terminal attributes string

* fix(ansi): report correct number of supported color registers

* fix(sixel): reap images that are completely covered

* style(comment): fix name

* test(sixel): infra

* test(sixel): cases and fixes

* fix(sixel): forward dcs bytes to sixel parser

* refactor(client): ansi stdin parser

* refactor(output): cleanup

* some refactorings

* fix test

* refactor(grid): sixel-grid / sixel-image-store

* refactor(grid): grid debug method

* refactor(grid): move various logic to sixel.rs

* refactor(grid): remove unused methods

* fix(sixel): work with multiple users

* refactor(pane): remove unused z_index

* style(fmt): prepend unused variable

* style(fmt): rustfmt

* fix(tests): various apis

* chore(dependencies): use published version of sixel crates

* style(fmt): rustfmt

* style(fmt): rustfmt

* style(lint): make clippy happy

* style(lint): make clippy happy... again

* style(lint): make clippy happy... again (chapter 2)

* style(comment): remove unused

* fix(colors): export COLORTERM and respond to XTVERSION

* fix(test): color register count

* fix(stdin): adjust STDIN sleep times

* docs(changelog): sixel support

* flake.lock: Update (#1575)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix(ci): add new rust toolchain location to action (#1576)

* rust-toolchain: Update (#1578)

Co-authored-by: a-kenji <a-kenji@users.noreply.github.com>

* chore(nix): hide `nix` directory (#1579)

* chore(gblame): add move to git-blame-ignore-revs

This is not relevant for `git blame` messages.

* chore(docs): add more matrix links (#1581)

* fix: add usage comment to fish shell auto-start snippet (#1574) (#1583)

* docs(changelog): add usage comment to fish script

* Refactor match session name (#1582)

* docs(changelog): refactor get session name (#1582)

* fix(cli): let the exit message be different when detaching (#1573)

* Let the exit message be different when detaching

This patch changes the exit message printed to the user, so the user
does not get the impression that they fat-fingered an "exit" instead of
what was intended (a detach).

For this, the InputHandler::exit() function was refactored, to get the
reason as a parameter. As this function is not pub, this is considered
okay.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>

* Change detach message

This patch changes the detach message to be more in line with the other
messages zellij displays to the user.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>

* docs(changelog): detach message

* perf(terminal): better responsiveness (#1585)

* performance(pty): only buffer terminal bytes when screen thread is backed up

* style(fmt): rustfmt

* docs(changelog): performance improvement

* style(fmt): rustfmt

* fix(search): adjust foreground color for better readability

* style(fmt): rustfmt

* test(e2e): update snapshots from SCROLL to SEARCH

* Rename search directions to up/down

* Rename search-functions in tests as well

* Move all search-related functions out of grid.rs and into search.rs and reuse as much as possible

* Fix bug where searches that fall on the line-ending are highlighting the whole line

* Silence clippy on what I think is a false-positive

* fix(terminal): persist cursor hide/show through alternate screen (#1586)

* fix(terminal): persist cursor hide/show through alternate screen

* style(fmt): rustfmt

* style(clippy): make clippy happy

* docs(changelog): cursor show/hide alternate screen fix

* fix(editor): handle editor/visual/configured editor with arguments (#1587)

* fix(editor): handle editor/visual/configured editor with arguments

* style(fmt): rustfmt

* docs(changelog): editor with arguments

* fix(ci): quoting issues (#1589)

* fix(mouse): avoid forwarding click events on pane border (#1584)

* if left click is on pane border do not forward to application

* properly handle frames

* fix comment

* fix another comment

* add tests, fix edge case

* docs(changelog): mouse click on pane frame fix

* flake.lock: Update (#1592)

Flake lock file updates:

• Updated input 'crate2nix':
    'github:kolloch/crate2nix/2d20dec4ae330f39b0bebeb8eb4a201b58d2b82c' (2022-07-09)
  → 'github:kolloch/crate2nix/45d97c7ce62c3d53954743057ceb32e483c31acd' (2022-07-12)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/b39924fc7764c08ae3b51beef9a3518c414cdb7d' (2022-07-08)
  → 'github:nixos/nixpkgs/4a01ca36d6bfc133bc617e661916a81327c9bbc8' (2022-07-14)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/3dfc78e42a285caaf83633224a42e7fb7dde191b' (2022-07-10)
  → 'github:oxalica/rust-overlay/2cd36d4aef875867ee1d7963541ccb3ae50b358c' (2022-07-16)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix(search): clear search when entering input in non-search-mode

* fix(search): handle searching in updating viewport

Co-authored-by: Martin Sirringhaus <>
Co-authored-by: a-kenji <aks.kenji@protonmail.com>
Co-authored-by: Thomas Linford <tlinford@users.noreply.github.com>
Co-authored-by: Aram Drevekenin <aram@poor.dev>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: a-kenji <a-kenji@users.noreply.github.com>
Co-authored-by: Tassilo Horn <tsdh@gnu.org>
Co-authored-by: Jae-Heon Ji <32578710+jaeheonji@users.noreply.github.com>
Co-authored-by: Matthias Beyer <mail@beyermatthias.de>
2022-07-18 10:54:23 +02:00
Jae-Heon Ji
8e2be2c61e
feat: add action to undo rename (#1513) 2022-06-18 09:58:42 +09:00
Cosmin Popescu
e1fcf3a6db
feat(scroll): edit scrollback with default editor (#1456)
* initial commit for opening the current buffer in an editor

* fix(editor): take hidden panes into consideration when manipulating tiled grid

* when closing an edit buffer, take the geometry of the replaced buffer from the closed buffer

* if the floating panels are displayed, don't add to hidden panels the current buffer

* strategy changing - put the panels inside a suppressed_panels HashMap instead of hidden_panels

* Revert "strategy changing - put the panels inside a suppressed_panels HashMap instead of hidden_panels"

This reverts commit c52a203a20.

* remove the floating panes by moving them to the tiled_panes in hidden_panels

* feat(edit): open editor to correct line and don't crash when none is set

* formatting

* feat(edit): use suppressed panes

* style(fmt): rustfmt and logs

* style(fmt): clean up unused code

* test(editor): integration test for suppressing/closing suppressed pane

* test(e2e): editor e2e test

* style(fmt): rustfmt

* feat(edit): update ui and setup

* style(fmt): rustfmt

* feat(config): allow configuring scrollback_editor explicitly

* style(fmt): rustfmt

* chore(repo): build after merging

Co-authored-by: Aram Drevekenin <aram@poor.dev>
2022-06-06 09:20:07 +02:00
a-kenji
d62e6fb57e
add(plugin): compact-bar & compact layout (#1450)
* add(plugin): `compact-bar` & `compact` layout

* add(nix): `compact-bar` plugin

* add(config): `compact-bar` to the config

* add(workspace): `compact-bar` to workspace members

* add(assets): `compact-bar`

* chore(fmt): rustfmt

* add(nix): add `compact-bar`

* add: compact layout to dump command

* nix(build): fix destination of copy command

* add(makefile): add `compact-bar` to `plugin-build`

* add(layout): `compact-bar` to layout

* add: install `compact-bar` plugin

* fix(test): update input plugin test

* fix(plugin): default colors for compact-bar
2022-06-03 11:14:38 +02:00
Thomas Linford
198625b055
feat(copy): add copy_on_select option (#1298)
* feat(copy): add copy_on_select option

with default value of true, keep current behavior of automatically
copying selection to clipboard when done selecting.
with copy_on_select = false, on mouse release the selection remains, and
can be copied with the `Copy` action.

* add example to default.yaml

* add copy action example to default.yaml, cleanup

* fix updated tab tests

* fix selection changing while scrolling after release

* fix clippy warnings
2022-04-16 09:04:06 +02:00
Aram Drevekenin
85262ba8ad docs(config): add link to theme examples 2022-04-13 15:38:32 +02:00
Aram Drevekenin
18ee784e2d
feat(ui): add navigation with alt + arrow keys (#1264)
* feat(ui): change from non-working alt-brackets to alt-arrows

* style(fmt): rustfmt

* fix: improve parsing of `alt` combination keys

The binding of the keys can now be specified with:

- Alt: 'c'
- Alt: Up
- Alt: Down
- Alt: Left
- Alt: Right

* chore(fmt): rustfmt

Co-authored-by: a-kenji <aks.kenji@protonmail.com>
2022-03-25 14:28:08 +01:00
Cason Adams
ca015ce9b6
add tmux ctrl+b d shortcut for detach (#1116) 2022-02-27 12:03:17 +01:00
Cason Adams
8577dfca02
add: a few extra tmux binding keys (#1098) 2022-02-24 10:19:02 +01:00
a-kenji
06184e8a32
add(conf): add action to send ^b (#1106)
add an action to send `^b` while in `tmux-mode`

fixes #1095
2022-02-24 04:58:27 +01:00
Aram Drevekenin
a0a0a7e5c4
feat(ux): tmux mode (#1073)
* work

* basic tmux move and functionality

* tmux mode ui

* rustfmt
2022-02-21 15:52:42 +01:00
Aram Drevekenin
821e7cbc5a
feat(ui): add floating panes (#1066)
* basic functionality

* close and reopen scratch terminal working

* embed/float and resize whole tab for floating and static floating panes

* move focus working

* fix focus change in floating panes

* move pane with mouse

* floating z indices

* tests and better resize algorithm

* starting to work on performance

* some performance experimentations

* new render engine

* reverse painters algorithm for floating panes

* fix frame buffering

* improve ux situation

* handle multiple new panes on screen without overlap

* adjust keybindings

* adjust key hints

* fix multiuser frame ui

* fix various floating/multiuser bugs

* remove stuff

* wide characters under floating panes

* fix wide character frame override

* fix non-frame boundaries interactions with floating panes

* fix selection character width

* fix title frame wide char overflow

* fix existing tests

* add tests

* refactor output out of tab

* refactor floating panes out of tab

* refactor tab

* moar refactoring

* refactorings and bring back terminal window title setting

* add frame vte output

* remove more unused stuff

* remove even more unused stuff

* you know the drill

* refactor floating panes and remove more stuffs

* refactor pane grids

* remove unused output caching

* refactor output

* remove unused stuff

* rustfmt

* some formatting

* rustfmt

* reduce clippy to normal

* remove comment

* remove unused

* fix closign pane

* fix tests
2022-02-18 21:10:06 +01:00
Thomas Linford
18709acde9
feat(copy): allow osc52 copy destination configuration (#1022)
add copy_cliboard  option to allow configuring copy destination to primary selection instead of default clipboard
2022-02-02 15:22:34 +01:00
Jordan Callicoat
5f86dc4fd0
doc(config): add copy-command examples to default config (PR #996) (#1019) 2022-01-20 17:36:59 +01:00
Kunal Mohan
e23d06b70d
Feature: Configurable scroll buffer (#936)
* Configurable scroll buffer

* Fix unit test failures

* Add scroll_buffer_size description in the default config file

* Fix config file
2022-01-04 23:24:05 +05:30
Aram Drevekenin
d4b14d7657
feat(keybinds): improve default keybindings (#991) 2022-01-04 17:24:18 +01:00
Kunal Mohan
c75bcbd937
Feature: Add pane names (#928)
* 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
2021-12-09 23:30:40 +05:30
a-kenji
b78a6d4258
fix(assets): update config option examples (#920)
* update config option examples:
  ```
  no_pane_frames -> pane_frames
  no_mouse_mode -> mouse_mode
  ```

closes #916
2021-12-03 11:13:56 +01:00
a-kenji
cd55c86260
Feat: add esc to exit modes (#889)
* Add ability to return to normal mode from any mode,
  except for the locked mode, by pressing the escape key
  to the default keybindings

  fix #887
2021-11-23 12:42:15 +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
Kunal Mohan
164eb6a5b7
Feature: Rotate Pane locations (#802)
fix #165
2021-10-26 09:54:05 +05:30
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
a-kenji
46a9ead668
add(config): add information to the config file (#766)
- add information to configuration directly to the config file
2021-10-05 20:08:00 +02:00
spacemaison
c9372212f6
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>
2021-09-22 18:13:21 +01:00
Aram Drevekenin
b1f17a624c fix(keys): bring back ctrl-n to get from scroll mode to resize mode 2021-09-15 14:03:55 +02:00
Brooks Rady
a51f500c17
fix(ui): change resize binding to Ctrl-n
* fix(ui): change resize binding to Ctrl-n

* Fix tests?

* Actually update the keybind in tests

* Cowardly refuse to fix the E2E testing issue
2021-08-30 18:02:14 +01:00
Aram Drevekenin
618c2c376b Merge branch 'tab-layout' of https://github.com/a-kenji/zellij into a-kenji-tab-layout 2021-08-24 10:58:36 +02:00
a-kenji
b1906c893a
Merge pull request #622 from sagittarius-a/feature/go-to-last-tab
feat(tab): add keybind to go to last tab visited
2021-08-23 23:18:43 +02:00
Aram Drevekenin
a37d3e5889
feat(ui): pane frames (new pane UI) (#643)
* work

* resize working

* move focus working

* close pane working

* selection and fullscreen working

* pane title line

* titles and conditional scroll title

* whole tab resize working

* plugin frames working

* plugin splitting working

* truncate pane frame titles

* cleanup

* panes always draw their own borders - also fix gap

* toggle pane frames

* move toggle to screen and fix some bugs

* fix plugin frame toggle

* fix terminal window resize

* fix scrolling and fullscreen bugs

* unit tests passing

* e2e tests passing and new test for new frames added

* refactor: TerminalPane and PluginPane

* refactor: Tab

* refactor: moar Tab

* refactor: Boundaries

* only render and calculate boundaries when there are no pane frames

* refactor: Layout

* fix(grid): properly resize when coming back from alternative viewport

* style: remove commented code

* style: fmt

* style: fmt

* style: fmt + clippy

* docs(changelog): update change
2021-08-12 14:50:00 +02:00
Sagittarius-a
081c55458d fix: rename action to ToggleTab 2021-08-03 21:12:20 +02:00
Sagittarius-a
5799ea4e5d feat(tab): add keybind to go to last tab visited
Fixes #398.

Tab key is used as default for the `GoToLastTab` action.
2021-08-03 21:11:50 +02:00
a-kenji
fc7bc3cc8b Merge branch 'main' of https://github.com/zellij-org/zellij into tab-layout 2021-08-01 20:25:33 +02:00
Sagittarius-a
7da214fcca feat(scroll): Restore scroll position on SIGINT
Fixes #606

Currently scroll down to bottom then exits scroll mode.
2021-07-24 21:28:19 +02:00
a-kenji
5ede25dc37 Add tabs to layouts
fixes #603, fixes #349

* The layout has now a unique `tabs` section,
  that can be used, like the `parts` section,
  everything that is not inside the tabs section
  is assumed to be present on every single tab
  that is opened.

  This is a BREAKING CHANGE for people that use
  custom `layouts` already, since the `tabs` section
  is not optional - for clarity and intentionality reasons.

  The functionality to specify multiple tabs is already there,
  but is still gated behind a panic, until #621 is fixed.
  So for now one tab can be specified to load on startup.

* The `NewTab` action can optionally be bound to open
  a layout that is assumed to be in the new `tabs` section

  This is a BREAKING CHANGE for people that have the
  `NewTab` action already bound in the config file:

```
- action: [NewTab, ]
  key: [F: 5,]
```
must now be specified as:
```
- action: [NewTab: ,]
  key: [F: 5,]
```
  Optionally a layout that should be opened on the new tab can be
  specified:
```
- action: [NewTab: {
  direction: Vertical,
  parts: [ {direction: Horizontal, split_size: {Percent: 50}}, {direction: Horizontal, run: {command: {cmd: "htop"}}},],
  key: [F: 6,]
```
or:
```
- action: [NewTab: {direction: Vertical, run: {command: {cmd: "htop"} }},]
  key: [F: 7,]
```
or
```
- action: [NewTab: {
  direction: Vertical,
  parts: [ {direction: Vertical, split_size: {Percent: 25},run: {plugin: "strider" }}, {direction: Horizontal}],}, MoveFocus: Left,]
  key: [F: 8,]

```
2021-07-23 17:13:35 +02:00
a-kenji
cf8d5a7a4d Use lowercase for options 2021-07-09 13:11:02 +02:00
Kunal Mohan
67ee63548a Add on_force_close config option 2021-07-09 00:36:47 +05:30
a-kenji
4e62b3a1b5 Move config assets to zellij-utils crate
* The assets macro seems to not be able to
read across create boundaries.
Now the assets are included in the crate they are used in.
2021-05-27 13:41:17 +02:00