aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/ipc/protobuf_conversion.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2026-01-20 10:13:37 +0100
committerGitHub <noreply@github.com>2026-01-20 10:13:37 +0100
commit03c86d09cf301db9a62427170f956a632812d67e (patch)
tree5eee73d6201cbe2066ec258a0b7612e84e97aa6d /zellij-utils/src/ipc/protobuf_conversion.rs
parentFix: allow 0% coordinate specification for floating panes (#4609) (diff)
downloadsl0ppij-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-utils/src/ipc/protobuf_conversion.rs')
-rw-r--r--zellij-utils/src/ipc/protobuf_conversion.rs42
1 files changed, 38 insertions, 4 deletions
diff --git a/zellij-utils/src/ipc/protobuf_conversion.rs b/zellij-utils/src/ipc/protobuf_conversion.rs
index 7539fa15..4b02cc7e 100644
--- a/zellij-utils/src/ipc/protobuf_conversion.rs
+++ b/zellij-utils/src/ipc/protobuf_conversion.rs
@@ -730,13 +730,14 @@ impl From<crate::input::actions::Action>
RenameSessionAction, RenameTabAction, RenameTerminalPaneAction, ResizeAction,
RunAction, ScrollDownAction, ScrollDownAtAction, ScrollToBottomAction,
ScrollToTopAction, ScrollUpAction, ScrollUpAtAction, SearchAction, SearchInputAction,
- SearchToggleOptionAction, SkipConfirmAction, StackPanesAction,
+ SearchToggleOptionAction, SetPaneBorderlessAction, SkipConfirmAction, StackPanesAction,
StartOrReloadPluginAction, SwitchFocusAction, SwitchModeForAllClientsAction,
SwitchSessionAction, SwitchToModeAction, TabNameInputAction, ToggleActiveSyncTabAction,
ToggleFloatingPanesAction, ToggleFocusFullscreenAction, ToggleGroupMarkingAction,
- ToggleMouseModeAction, TogglePaneEmbedOrFloatingAction, TogglePaneFramesAction,
- TogglePaneInGroupAction, TogglePanePinnedAction, ToggleTabAction, UndoRenamePaneAction,
- UndoRenameTabAction, WriteAction, WriteCharsAction,
+ ToggleMouseModeAction, TogglePaneBorderlessAction, TogglePaneEmbedOrFloatingAction,
+ TogglePaneFramesAction, TogglePaneInGroupAction, TogglePanePinnedAction,
+ ToggleTabAction, UndoRenamePaneAction, UndoRenameTabAction, WriteAction,
+ WriteCharsAction,
};
use std::collections::HashMap;
@@ -1282,6 +1283,18 @@ impl From<crate::input::actions::Action>
pane_id: Some(pane_id.into()),
coordinates: Some(coordinates.into()),
}),
+ crate::input::actions::Action::TogglePaneBorderless { pane_id } => {
+ ActionType::TogglePaneBorderless(TogglePaneBorderlessAction {
+ pane_id: Some(pane_id.into()),
+ })
+ },
+ crate::input::actions::Action::SetPaneBorderless {
+ pane_id,
+ borderless,
+ } => ActionType::SetPaneBorderless(SetPaneBorderlessAction {
+ pane_id: Some(pane_id.into()),
+ borderless,
+ }),
crate::input::actions::Action::TogglePaneInGroup => {
ActionType::TogglePaneInGroup(TogglePaneInGroupAction {})
},
@@ -1876,6 +1889,23 @@ impl TryFrom<crate::client_server_contract::client_server_contract::Action>
.try_into()?,
},
),
+ ActionType::TogglePaneBorderless(toggle_borderless_action) => {
+ Ok(crate::input::actions::Action::TogglePaneBorderless {
+ pane_id: toggle_borderless_action
+ .pane_id
+ .ok_or_else(|| anyhow!("TogglePaneBorderless missing pane_id"))?
+ .try_into()?,
+ })
+ },
+ ActionType::SetPaneBorderless(set_borderless_action) => {
+ Ok(crate::input::actions::Action::SetPaneBorderless {
+ pane_id: set_borderless_action
+ .pane_id
+ .ok_or_else(|| anyhow!("SetPaneBorderless missing pane_id"))?
+ .try_into()?,
+ borderless: set_borderless_action.borderless,
+ })
+ },
ActionType::TogglePaneInGroup(_) => {
Ok(crate::input::actions::Action::TogglePaneInGroup)
},
@@ -2491,6 +2521,7 @@ impl From<crate::data::FloatingPaneCoordinates>
width: coords.width.map(|w| w.into()),
height: coords.height.map(|h| h.into()),
pinned: coords.pinned,
+ borderless: coords.borderless,
}
}
}
@@ -2509,6 +2540,7 @@ impl TryFrom<crate::client_server_contract::client_server_contract::FloatingPane
width: coords.width.map(|w| w.try_into()).transpose()?,
height: coords.height.map(|h| h.try_into()).transpose()?,
pinned: coords.pinned,
+ borderless: coords.borderless,
})
}
}
@@ -2883,6 +2915,7 @@ impl From<crate::input::layout::FloatingPaneLayout>
already_running: layout.already_running,
pane_initial_contents: layout.pane_initial_contents,
logical_position: layout.logical_position.map(|l| l as u32),
+ borderless: layout.borderless,
}
}
}
@@ -3307,6 +3340,7 @@ impl TryFrom<crate::client_server_contract::client_server_contract::FloatingPane
already_running: layout.already_running,
pane_initial_contents: layout.pane_initial_contents,
logical_position: layout.logical_position.map(|p| p as usize),
+ borderless: layout.borderless,
})
}
}