Commit Graph

476 Commits

Author SHA1 Message Date
Aram Drevekenin
89ce355c04
feat(config): allow disabling writing session metadata to disk (#3258)
* feat(config): allow disabling writing session metadata to disk

* style(fmt): rustfmt
2024-04-12 16:15:11 +02:00
Aram Drevekenin
e68bc649d6
feat(cli): allow starting a session detached (#3257)
* feat(cli): allow starting a session detached

* fix tests
2024-04-12 15:39:36 +02:00
Aram Drevekenin
57676f161f
fix(swap-layouts): properly identify plugin aliases with initial cwd (#3250)
* fix(swap-layouts): properly identify plugin aliases with initial cwd

* style(fmt): rustfmt
2024-04-10 17:00:04 +02:00
Aram Drevekenin
41dbe65e26
fix(layouts): recover from resurrection crash and pick up swap layouts properly (#3249)
* fix(layouts): recover from issues in the constraint system

* fix(keybinds): pick up swap layouts for new tab keybinding
2024-04-10 15:26:54 +02:00
Aram Drevekenin
462239b535
fix(plugins): various pre-release issues (#3246)
* fix(strider): close_self instead of close_focus

* fix(plugins): populate caller_cwd for all aliases

* fix(config): launch the session-manager alias rather than the explicit internal url

* style(fmt): rustfmt

* fix tests
2024-04-05 18:43:14 +02:00
har7an
cf18fb3867
utils/cli: Add move-tab action (#3244)
* utils/cli: Add `move-tab` action

which was previously only exposed through keybindings.

* CHANGELOG: Add PR 3244.
2024-04-04 13:26:42 +00:00
Aram Drevekenin
9d2e7fe2c1
feat(plugins): add api to close current plugin instance (#3228) 2024-03-27 20:24:18 +01:00
Axel H
a54a7ea2bd
fix(plugins): session layouts are still serialized using the legacy plugin syntax (remote:) (#3224)
* fix(plugins): session layouts were still serialized using the legacy plugin syntax (remote:)

* use example domain

* style(fmt): rustfmt

---------

Co-authored-by: Aram Drevekenin <aram@poor.dev>
2024-03-27 11:53:26 +01:00
Aram Drevekenin
2eaa50cc44
feat(plugins): add api to dump the current session layout to a plugin (#3227) 2024-03-26 18:44:56 +01:00
Ido Yariv
03e8a9398a
fix(keybindings): add support for binding Ctrl-Space (#3101)
* Add support for binding Ctrl-@

On most terminals, typing Ctrl-@ results in a null character with no
modifier.

Moreover, Ctrl-Space is commonly mapped as an alias for Ctrl-@, making
it easier to bind it as well.

* style(fmt): rustfmt

---------

Co-authored-by: Aram Drevekenin <aram@poor.dev>
2024-03-26 12:12:58 +01:00
Bradford Hovinen
312817fcf6
fix(config): add support for Ctrl and Alt modifiers on function keys in keybindings (#3179)
Previously, it was not possible to define keybindings with a modifier
and a function key. The `Key` enum only supported combinging the Ctrl
and Alt modifiers with letters. This is somewhat limiting: I would like
to make the Zellij keybindings more "distant" than those used in the
programs I use from within Zelilj, so that Zellij does not intefere with
those programs. Thus I would like to move some of the keybindings from
Ctrl+<character> to Ctrl+<function key>.

This change adds:

  * support for function keys with the Ctrl and Alt modifiers in the
    `Key` enum,
  * support for parsing such keybindings from the configuration file,
  * support for such keybindings in the protobuf which communicates the
    keybindings to plugins, and
  * support for these keybindings in the plugin API.

This is tested by modifying one of the e2e tests to include an example
of such keybindings. This verifies that the configuration is correctly
parsed, communicated with the plugin, and rendered.
2024-03-25 15:04:38 +01:00
Aram Drevekenin
223730f04a
style(fmt): fix warnings (#3223)
* fix warnings in zellij-server

* style(fmt): remove warnings

* style(fmt): rustfmt
2024-03-25 14:22:52 +01:00
Cristian Dominguez
8b2263ecf3
feat(cli): add run/edit in-place functions (#3038)
Co-authored-by: Aram Drevekenin <aram@poor.dev>
2024-03-25 12:31:02 +01:00
Aram Drevekenin
86e91ae137
fix(startup): recover from race condition that causes Zellij to start in the wrong size (#3218)
* fix(startup): recover from Zellij starting up in the wrong size

* style(fmt): rustfmt

* fix tests
2024-03-25 10:28:21 +01:00
toymil
9deb033340
feat: list-sessions show newest sessions last, for better user experience (#3194)
* feat: sort `list-sessions` from oldest to newest

by putting the most recent sessions last, the user won't need to scroll back up
to see active sessions when there are a lot of resurrectable sessions.

* feat: add an `--reverse` option to the `list-sessions` subcommand

the `--reverse` flag reverts sorting order back to the old "newest sessions
first".  also updated call sites of `list_sessions` and `print_sessions` with
`reverse: true`, to keep the original behavior everywhere else except the output
of `list-sessions` subcommand.

* chore: update the help message

---------

Co-authored-by: Jae-Heon Ji <atx6419@gmail.com>
2024-03-24 23:30:47 +09:00
Aram Drevekenin
5fb75ab6d1
fix(swap-layouts): properly identify plugin aliases (#3217) 2024-03-22 17:01:17 +01:00
Aram Drevekenin
07b76ee610
feat(pipes): allow piping messages to plugins from keybindings (#3212) 2024-03-21 16:52:15 +01:00
Aram Drevekenin
c8b210cc67
HOTFIX: remove debug path 2024-03-20 18:36:19 +01:00
Aram Drevekenin
ec6d627b06
chore(integrations): zpipe alias (#3210)
* chore(completions): zpipe alias

* chore(integrations): zpipe alias
2024-03-20 18:34:50 +01:00
Aram Drevekenin
ee16a4b8c3
feat(plugins): session manager cwd and new filepicker (#3200)
* prototype

* folder selection ui in session manager

* overhaul strider

* scan folder host command

* get strider to work from the cli and some cli pipe fixes

* some ux improvements to strider

* improve strider's ui

* make strider ui responsive

* make session-manager new ui parts responsive

* fix tests

* style(fmt): rustfmt
2024-03-18 09:19:58 +01:00
Aram Drevekenin
896b09aa6f
feat(plugins): allow specifying the cwd when switching sessions (#3172)
* feat(plugins): allow specifying the cwd when switching sessions

* style(fmt): rustfmt
2024-02-29 16:26:25 +01:00
Aram Drevekenin
c725f6f4d3
feat(plugins): allow piping messages to a specific plugin id (#3170)
* feat(plugins): allow piping messages to a specific plugin id

* style(fmt): rustfmt
2024-02-29 14:07:05 +01:00
Aram Drevekenin
6340b5e312
fix(plugins): respect cwd and start filepicker at filesystem root (#3161)
* allow padding cwd to plugins

* improve strider performance and fix alias cwd issue

* style(fmt): rustfmt
2024-02-28 16:12:12 +01:00
Aram Drevekenin
21273ac95a
feat(plugins): introduce plugin aliases (#3157)
* working prototype with passing tests

* new tests and passing plugin tests as well

* style(code): cleanups

* cleanup strider from unused search feature

* prototype of removing old plugin block from the config

* aliases working from config file and all tests passing

* fixups and cleanups

* use aliases in layouts

* update test snapshot

* style(fmt): rustfmt
2024-02-26 15:30:15 +01:00
Bartosz Zbytniewski
dd5ea26cc7
feat: add moving tab to other position (#3047)
* feat: add moving tab to other position

* docs(changelog): revert changes

* test: update config snapshots

* refactor: get rid of HorizontalDirection enum

* refactor: cleanup code order

* refactor: use debug! instead of info!

* refactor: use more defensive way to switch tabs

* refactor: revert tip changes

* refactor: code formatting

* refactor: improve invalid input notification

* refactor: inline fns for calculating target index

---------

Co-authored-by: Jae-Heon Ji <atx6419@gmail.com>
2024-02-19 03:40:03 +09:00
Aram Drevekenin
326c8cd3c6
feat(panes): allow specifying coordinates for a new floating pane through the CLI or plugins (#3122)
* working

* add tests

* add coordinates to all the places

* refactor: move things around:

* style(fmt): rustfmt

* style(code): cleanups
2024-02-08 17:35:55 +01:00
Aram Drevekenin
7e549cdbd5
fix(cli): respect cwd in zellij run and zellij plugin (#3116)
* fix(cli): respect cwd in zellij run and zellij plugin commands

* style(fmt): rustfmt

* fix tests
2024-02-07 10:39:51 +01:00
Aram Drevekenin
6b20a958f4
feat(sessions): welcome screen (#3112)
* prototype - can send layout name for new session from session-manager

* feat(sessions): ui for selecting layout for new session in the session-manager

* fix: send available layouts to plugins

* make tests compile

* fix tests

* improve ui

* fix: respect built-in layouts

* ui for built-in layouts

* some cleanups

* style(fmt): rustfmt

* welcome screen ui

* fix: make sure layout config is not shared between sessions

* allow disconnecting other users from current session and killing other sessions

* fix: respect default layout

* add welcome screen layout

* tests(plugins): new api methods

* fix(session-manager): do not quit welcome screen on esc and break

* fix(plugins): adjust permissions

* style(fmt): rustfmt

* style(fmt): fix warnings
2024-02-06 14:26:14 +01:00
Aram Drevekenin
d780bd9105
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
2024-01-17 12:10:49 +01:00
har7an
f6d57295a0
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.
2024-01-08 16:56:01 +00:00
Jae-Heon Ji
b3035fc2d7
perf: improve plugin download & load feature (#3001) 2023-12-13 01:21:32 +09:00
Aram Drevekenin
b0f36540fe
feat(plugins): skip plugin cache flag (#2971)
* feat(plugins): allow explicitly skipping the plugin cache when loading

* style(fmt): rustfmt

* fix tests
2023-11-30 18:10:50 +01:00
Aram Drevekenin
65bea269a4 chore(version): bump development version 2023-11-29 13:13:23 +01:00
Aram Drevekenin
d9b956bc40 chore(release): v0.39.2 2023-11-29 11:46:21 +01:00
Aram Drevekenin
8e2d37e141 chore(version): bump to 0.39.2 2023-11-29 11:41:59 +01:00
wendrul
ff80e7ed24
Fix typo in help page (#2906) 2023-11-14 00:20:10 +09:00
Aram Drevekenin
c33f5b6cc6 chore(version): bump development version 2023-11-13 10:17:12 +01:00
Aram Drevekenin
ebcf35989a chore(release): v0.39.1 2023-11-13 08:51:24 +01:00
Aram Drevekenin
3b4a355f0d
feat(config): add serialization interval configuration (#2923)
* add serialization interval configuration

* fix e2e tests

* fix e2e tests
2023-11-10 14:16:02 +01:00
Aram Drevekenin
ea5e6aa8d7
fix(ux): LaunchPlugin and some cwd fixes (#2916)
* LaunchPlugin and some cwd fixes

* style(fmt): rustfmt

* fix e2e tests and some cleanups

* fmt
2023-11-08 11:37:06 +01:00
Aram Drevekenin
b20715b5ae chore(version): bump development version 2023-11-07 10:28:04 +01:00
Aram Drevekenin
4e34c503d0 chore(release): v0.39.0 2023-11-07 08:36:31 +01:00
Aram Drevekenin
3bb30026f6
fix(resurrection): properly serialize certain edge cases (#2907)
* fix(resurrection): properly serialize certain edge cases

* style(fmt): rustfmt
2023-11-06 15:32:40 +01:00
Aram Drevekenin
a3d63bec55
fix(plugins): start plugin pane in cwd of focused pane if possible (#2905)
* fix(plugins): start plugin pane in cwd of focused pane if possible

* disable clippy - I have had enough

* fix tests
2023-11-06 08:30:17 +01:00
Aram Drevekenin
28a165a969
feat(ux): allow renaming sessions (#2903)
* change session name through the cli

* change session name from the session-manager

* style(fmt): rustfmt
2023-11-05 15:32:05 +01:00
Eatgrass
7f87d93a43
feat(terminal): support styled underlines (#2730)
* feat: support styled underlines

* remove deadcode

* Add ansi_underlines config option

* Add missing variables

* Add ansi_underlines on Output and OutputBuffer

* Fix tests

* Add separate styled underline enum

* Remove ansi_underlines from fg and bg

* Remove unneeded variables

* Rename ansi_underlines -> styled_underlines

* Simplify CharacterStyles::new()

* Move styled_underlines config description

* Fix single underline and remove extra field on CharacterStyles

* Read styled-underlines flag from cli opts

* remove extra attribute left from merge conflict

---------

Co-authored-by: Mike Lloyd <mike.lloyd03@pm.me>
Co-authored-by: Mike Lloyd <49411532+mike-lloyd03@users.noreply.github.com>
Co-authored-by: Aram Drevekenin <aram@poor.dev>
2023-11-05 15:30:35 +01:00
Aram Drevekenin
4c6b03acc1
feat(sessions): resurrect sessions through the session-manager (and plugin API) (#2902)
* working with table and scrolling

* ui and functionality complete

* fix formatting

* refactor: background jobs

* style(fmt): rustfmt
2023-11-04 11:20:50 +01:00
Jae-Heon Ji
c87ff8cb2e
feat: load plugins from the web (#2863)
* feat: add basic downloader

* feat: add download progress bar

* feat: move crate location and some fix

* feat: add downloader in layout

* chore: remove comment

* Revert "feat: add downloader in layout"

This reverts commit ac4efb937e.

* feat: change http request module to surf

* feat: add some function

* feat: add plugin download in wasm

* feat: add error handling

* test: update unittest

* feat: change hash library from ring to highway

* fix: openssl-sys issue for surf-client

* minor adjustments

* style(fmt): rustfmt

* move openssl-sys back to dependencies

---------

Co-authored-by: Aram Drevekenin <aram@poor.dev>
2023-11-02 13:09:18 +01:00
Daniel Jankowski
35d93189e3
fix(cli): session names only for attach in fish completion (#2857)
* feat(client): add flag for short output list-sessions

* fix(cli): list session names on fish completion

* chore(client): run cargo fmt
2023-10-20 17:51:01 +02:00
Aram Drevekenin
b59b29a534
feat(plugins): web requests api (#2879)
* feat(plugins): web requests api

* fix e2e tests

* fix e2e tests again
2023-10-20 14:20:00 +02:00