diff options
author | Aram Drevekenin <aram@poor.dev> | 2023-06-17 14:41:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-17 14:41:49 +0200 |
commit | 63e3a1eae2e727a808084d9fe9ff6eca7816ef7e (patch) | |
tree | 445840cba9b3193eca8d5fc73e9cffa610f510ca /default-plugins | |
parent | 044519f53740d02b6feabe379bc618a1ce5c4ec2 (diff) |
feat(plugins): more plugin api methods (#2550)
* feat(plugins): close, focus, rename pane, rename tab and show_self api methods
* style(fmt): rustfmt
Diffstat (limited to 'default-plugins')
-rw-r--r-- | default-plugins/fixture-plugin-for-tests/src/main.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/default-plugins/fixture-plugin-for-tests/src/main.rs b/default-plugins/fixture-plugin-for-tests/src/main.rs index 2107137d1..9ce45f8af 100644 --- a/default-plugins/fixture-plugin-for-tests/src/main.rs +++ b/default-plugins/fixture-plugin-for-tests/src/main.rs @@ -183,6 +183,33 @@ impl ZellijPlugin for State { Key::Ctrl('p') => { hide_self(); }, + Key::Ctrl('q') => { + let should_float_if_hidden = false; + show_self(should_float_if_hidden); + }, + Key::Ctrl('r') => { + close_terminal_pane(1); + }, + Key::Ctrl('s') => { + close_plugin_pane(1); + }, + Key::Ctrl('t') => { + let should_float_if_hidden = false; + focus_terminal_pane(1, should_float_if_hidden); + }, + Key::Ctrl('u') => { + let should_float_if_hidden = false; + focus_plugin_pane(1, should_float_if_hidden); + }, + Key::Ctrl('v') => { + rename_terminal_pane(1, "new terminal_pane_name"); + }, + Key::Ctrl('w') => { + rename_plugin_pane(1, "new plugin_pane_name"); + }, + Key::Ctrl('x') => { + rename_tab(1, "new tab name"); + }, _ => {}, }, Event::CustomMessage(message, payload) => { |