Commit Graph

513 Commits

Author SHA1 Message Date
Aram Drevekenin
203fbf7a49
feat(cli): make --layout idempotent(-ish) (#3650)
* feat(cli): if inside a session, apply --layout to the session

* fix(screen): some focusing races when switching tab focus

* style(fmt): rustfmt
2024-10-08 16:57:54 +02:00
Aram Drevekenin
ba2772e31c
fix(http): web requests (#3643) 2024-10-04 18:09:06 +02:00
Aram Drevekenin
0511ae1ae2
fix(resurrection): various serialization issues (#3636)
* fix(serialization): use kdl-rs for serialization

* style(fmt): remove dead code

* tests(serialization): update snapshots

* style(fmt): rustfmt
2024-10-02 16:16:22 +02:00
Aram Drevekenin
9f1e38f9fa
feat(ui): built-in plugin manager (#3633)
* add plugin list to session info

* feat(plugins): new_plugin and reload_plugin API commands

* feat(plugins): built-in plugin manager

* style(fmt): rustfmt

* update plugins
2024-09-30 18:04:40 +02:00
Aram Drevekenin
ce8e3995df
feat(config): allow loading background plugins on startup (#3616)
* remove old partial implementation

* feat(plugins): allow loading background plugins on startup

* add e2e test

* update config

* udpate config merging

* style(fmt): rustfmt
2024-09-20 15:38:20 +02:00
Aram Drevekenin
d78f3586dd
feat(plugins): APIs to break multiple panes into a new tab or an existing tab (#3610)
* feat(plugins): break multiple panes to a new tab

* fix(layouts): properly ignore run instructions when breaking panes

* feat(plugins): break multiple panes to existing tab

* feat(apis): allow these methods to also specify whether they want focus changed to the tab

* various fixes

* allow specifying name for the new tab when breaking out panes

* style(fmt): rustfmt
2024-09-16 21:02:04 +02:00
Aram Drevekenin
1776d240da
feat(plugins): add plugin APIs to affect other panes (#3576)
* resize_pane_with_id and close_pane_with_id

* focus_pane_with_id and edit_scrollback_for_pane_with_id

* write_to_pane_id and write_chars_to_pane_id

* lots more commands

* style(fmt): rustfmt
2024-08-29 17:35:21 +02:00
Aram Drevekenin
820ff85231
feat(ux): reload config options at runtime (#3564)
* change simplified_ui at runtime

* change default_shell at runtime

* change pane_frames (from config) at runtime

* all other options

* some refactoring

* style(fmt): rustfmt
2024-08-23 15:41:48 +02:00
Aram Drevekenin
08b6072a69
feat(plugins): API to temporarily bind keys to send a message to a specific plugin id (#3561) 2024-08-21 16:46:01 +02:00
Aram Drevekenin
e96491a3cf
feat(ux): change themes at runtime (#3559) 2024-08-20 16:10:27 +02:00
Aram Drevekenin
cfbc0ff490
feat(ux): reload config at runtime (#3558)
* feat(ux): reload config at runtime

* style(fmt): rustfmt
2024-08-19 19:02:52 +02:00
Aram Drevekenin
056537d3ee
feat(ux): first run setup-wizard (#3556)
* separate saved/runtime structure, kind of working

* serializing config

* work

* work

* save config through the configuration screen

* work

* startup wizard

* style(code): cleanups

* fix(session): reload config from disk when switching sessions

* style(fmt): rustfmt

* fix(config): propagate cli config options to screen

* style(fmt): rustfmt
2024-08-16 14:00:01 +02:00
Aram Drevekenin
a3ad621dc7
feat(plugins): command pane re-run event (#3553) 2024-08-14 16:47:46 +02:00
Aram Drevekenin
d44950a5bd
feat(plugins): rerun_command_pane API (#3546)
* feat(plugins): rerun_command_pane API

* fix tests
2024-08-07 19:20:41 +02:00
Aram Drevekenin
8080050aac
fix(plugins): various cwd fixes (#3545)
* fix(plugins): various cwd fixes

* fix tests
2024-08-07 13:46:08 +02:00
Aram Drevekenin
355463383a
feat(plugins): allow opening command panes in the background (hidden) (#3530)
* start background pane

* open command and edit panes in the background

* some cleanups

* style(fmt): rustfmt

* more cleanups
2024-07-29 11:40:01 +02:00
Aram Drevekenin
ffbdb095ec
feat(plugins): some APIs for controlling and receiving information about other panes (#3515)
* add context to opening command panes, and events for their start/finish

* show/hide other panes plugin apis

* get tests to pass

* style(fmt): rustfmt

* update plugin test snapshots
2024-07-22 18:30:18 +02:00
Aram Drevekenin
579a54ec45
fix(serialization): do not serialize junk sessions (#3504)
* fix(serialization): do not serialize junk sessions

* style(fmt): rustfmt
2024-07-18 14:29:03 +02:00
Aram Drevekenin
2deffc3289
feat(plugins): add stringified layout to switch_session_with_layout (#3503) 2024-07-18 10:45:42 +02:00
Aram Drevekenin
84ff29dd02
feat(ui): configuration screen + configure non-colliding keys at runtime (#3502)
* rebind => reconfigure

* persist keybinds and mode info to new tabs

* add configuration plugin

* make tests pass

* remove warnings

* style(fmt): rustfmt
2024-07-17 16:08:31 +02:00
Aram Drevekenin
dcd3ae2861
fix(terminal): session-manager enter and some more keys (#3484) 2024-07-08 17:36:24 +02:00
Aram Drevekenin
a6d6c0e4ff
feat(ui): status bar redesign (#3475)
* work

* work

* working

* get default mode from server and some ui responsiveness

* work

* finish design and get tests to pass

* get e2e tests to pass

* add classic layout

* add classic layout assets

* fix e2e tests

* style(fmt): rustfmt

* fix plugin system test

* style(fmt): some cleanups
2024-07-05 15:13:51 +02:00
bjorn3
7d7848cddc
dependencies: switch from Wasmer to Wasmtime (#3349)
* Remove ForeignFunctionEnv wrapper around PluginEnv

This will enable PluginEnv to be the Store context when migrating to
Wasmtime.

* Pass PluginEnv by value to load_plugin_instance

This will allow removing the Clone impl from PluginEnv when migrating to
Wasmtime as required by the missing Clone impl on Wasmtime's WasiCtx.

* Avoid passing a Store around when an Engine is enough

* Pass PluginEnv to the wasi read/write functions

Wasmtime requires storing the read/write end of the pipe outside of the
WasiCtx. Passing PluginEnv to these functions allows storing them in the
PluginEnv.

* Migrate to Wasmtime

* Switch from wasi-common to wasmtime-wasi

* Reduce verbosity of wasmtime_wasi logs

* Increase startup delay

To wait for all plugins to be compiled.

* Disable some wasmtime features

* Update to Wasmtime 21.0.1
2024-06-28 16:47:43 +02:00
Aram Drevekenin
1f0ae94f01
feat(plugins): rebind keys at runtime (#3422)
* refactor(server): interpret keys on server so they can be rebound

* feat(plugins): allow rebinding keys at runtime

* various cleanups

* add tests

* style(fmt): rustfmt

* fix(tests): address (some) e2e test flakiness

* style(fmt): rustfmt
2024-06-14 17:11:02 +02:00
Aram Drevekenin
62c37a87cc
feat(keybindings): support multiple modifiers (eg. Ctrl+Alt) and the kitty keyboard protocol (#3383)
* parse kitty keys from STDIN

* work

* work

* replace internal Key representation with the new KeyWithModifier in all the places

* work

* work

* allow disabling with config

* adjust ordering

* handle enabling/disabling properly on the client

* support multiple modifiers without kitty too

* normalize uppercase keys

* get tests to pass

* various cleanups

* style(fmt): rustfmt
2024-05-27 16:15:09 +02:00
har7an
64a5ac095c
Update soon-to-be incompatible dependencies (#3315)
* utils/cargo: Bump `wezterm` dependency

to 0.22.0 which, according to [their changelog][1], doesn't introduce
any changes at all over the previously used 0.20.0. It does, however,
update some of its' dependencies allowing us to update the transitive
deps `nom v5.1.2` and `terminfo v0.7.3`, which have caused warnings
during build/installation for quite some time now.

[1]: https://github.com/wez/wezterm/blob/main/termwiz/CHANGELOG.md

* server/cargo: Bump `daemonize` dependency

to v0.5.0, which eliminates a future-compat warning that has been around
for a while now. It doesn't state changes in the Changelog that we
should be aware of and doesn't cause apparent breakage during builds
either.

* utils/cargo: Sort dependencies alphabetically.

* CHANGELOG: Add PR #3315.

* server/lib: Convert bitmask to u32

to avoid type conversion issues on MacOS builds.
2024-05-18 11:59:14 +00:00
Aram Drevekenin
90a62217fd
feat(layouts): allow consuming a layout from a url (#3351)
* feat(cli): allow loading layouts directly from a url

* feat(plugins): allow loading layouts directly from a url

* style(fmt): rustfmt
2024-05-15 11:20:36 +02:00
Aram Drevekenin
81c5a2a9df chore(version): bump development version 2024-05-02 10:43:25 +02:00
Aram Drevekenin
cd0cc06cec chore(release): v0.40.1 2024-05-02 09:02:03 +02:00
Aram Drevekenin
d81bda0937 chore(version): adjust version for release 2024-05-02 08:56:36 +02:00
hiasr
1338962568
feat(stdin): allow binding Ctrl J (#3307)
* Fixed Control j keybindings

* Fix formatting
2024-05-02 08:38:19 +02:00
Aram Drevekenin
64ce7a7d75
feat(cli): list clients, their focused pane_id and the running command (#3314)
* feat(cli): list clients

* style(fmt): rustfmt
2024-04-30 15:21:04 +02:00
Aram Drevekenin
7562a81f0d
feat(plugins): add API to open new tabs with a LayoutInfo (#3305)
* feat(plugins): add api to open new tabs with a layout info

* fix tests
2024-04-26 11:38:39 +02:00
Aram Drevekenin
cb026b3cfe
fix(cli): merge attach options (#3288) 2024-04-22 12:42:37 +02:00
Aram Drevekenin
07dddc60fc chore(version): bump development version 2024-04-16 12:03:02 +02:00
Aram Drevekenin
45cc452b04 chore(release): v0.40.0 2024-04-16 09:15:13 +02:00
Aram Drevekenin
954bdcb1a2
fix(cli): rename attach --background to attach --create-background (#3265)
* fix(cli): rename background to create_background

* fix(cli): change create-background shortcut
2024-04-15 17:37:38 +02:00
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