diff options
| author | Aram Drevekenin <aram@poor.dev> | 2026-01-20 10:13:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-20 10:13:37 +0100 |
| commit | 03c86d09cf301db9a62427170f956a632812d67e (patch) | |
| tree | 5eee73d6201cbe2066ec258a0b7612e84e97aa6d /zellij-tile | |
| parent | Fix: allow 0% coordinate specification for floating panes (#4609) (diff) | |
| download | sl0ppij-03c86d09cf301db9a62427170f956a632812d67e.tar.gz sl0ppij-03c86d09cf301db9a62427170f956a632812d67e.tar.xz sl0ppij-03c86d09cf301db9a62427170f956a632812d67e.zip | |
Allow toggling pane frames for specific panes (#4615)
* initial implementation
* add borderless to edit and plugin cli commands
* allow changing existing pane to borderless
* allow setting in layouts and keybindings
* get to work through the existing plugin api commands
* fix when applying (swap) layouts
* fix tests
* allow setting pane as bordered (borderful?) when changing its coordinates (eg. through the cli)
* allow explicitly setting a pane as bordered or borderless without toggling
* rustfmt
* adjust snapshots
* docs(changelog): add PR
Diffstat (limited to 'zellij-tile')
| -rw-r--r-- | zellij-tile/src/shim.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/zellij-tile/src/shim.rs b/zellij-tile/src/shim.rs index 25180259..56687e5c 100644 --- a/zellij-tile/src/shim.rs +++ b/zellij-tile/src/shim.rs @@ -1760,6 +1760,29 @@ pub fn change_floating_panes_coordinates( unsafe { host_run_plugin_command() }; } +/// Toggle the borderless state of a pane identified by pane_id +/// +/// # Arguments +/// * `pane_id` - The ID of the pane to toggle (PaneId::Terminal or PaneId::Plugin) +pub fn toggle_pane_borderless(pane_id: PaneId) { + let plugin_command = PluginCommand::TogglePaneBorderless(pane_id); + let protobuf_plugin_command: ProtobufPluginCommand = plugin_command.try_into().unwrap(); + object_to_stdout(&protobuf_plugin_command.encode_to_vec()); + unsafe { host_run_plugin_command() }; +} + +/// Set the borderless state of a pane explicitly +/// +/// # Arguments +/// * `pane_id` - The ID of the pane (PaneId::Terminal or PaneId::Plugin) +/// * `borderless` - true for borderless, false for bordered +pub fn set_pane_borderless(pane_id: PaneId, borderless: bool) { + let plugin_command = PluginCommand::SetPaneBorderless(pane_id, borderless); + let protobuf_plugin_command: ProtobufPluginCommand = plugin_command.try_into().unwrap(); + object_to_stdout(&protobuf_plugin_command.encode_to_vec()); + unsafe { host_run_plugin_command() }; +} + pub fn start_web_server() { let plugin_command = PluginCommand::StartWebServer; let protobuf_plugin_command: ProtobufPluginCommand = plugin_command.try_into().unwrap(); |
