diff options
author | Aram Drevekenin <aram@poor.dev> | 2024-06-14 17:11:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-14 17:11:02 +0200 |
commit | 1f0ae94f01647eab66cabbd11434ecae1fac8da3 (patch) | |
tree | b568f9ffc2064f4bdfd9c02c0aa5e581a3d1e750 /zellij-tile/src | |
parent | 2ac8b151915958782efa4f5714f5253e983613c5 (diff) |
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
Diffstat (limited to 'zellij-tile/src')
-rw-r--r-- | zellij-tile/src/shim.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/zellij-tile/src/shim.rs b/zellij-tile/src/shim.rs index ead213320..01049b375 100644 --- a/zellij-tile/src/shim.rs +++ b/zellij-tile/src/shim.rs @@ -808,6 +808,14 @@ pub fn dump_session_layout() { unsafe { host_run_plugin_command() }; } +/// Rebind keys for the current user +pub fn rebind_keys(keys: String) { + let plugin_command = PluginCommand::RebindKeys(keys); + let protobuf_plugin_command: ProtobufPluginCommand = plugin_command.try_into().unwrap(); + object_to_stdout(&protobuf_plugin_command.encode_to_vec()); + unsafe { host_run_plugin_command() }; +} + // Utility Functions #[allow(unused)] |