aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-client
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-08 19:49:23 +0200
committeruser <user@clank>2026-08-08 19:49:23 +0200
commit30782cbb2fab4e01cadb9815927a404591472064 (patch)
tree29bdd07fc0c56c7ec38b1238066f1ae0ee6e53c5 /zellij-client
parentsl0p: configurable pane title alignment (diff)
downloadsl0ppij-30782cbb2fab4e01cadb9815927a404591472064.tar.gz
sl0ppij-30782cbb2fab4e01cadb9815927a404591472064.tar.xz
sl0ppij-30782cbb2fab4e01cadb9815927a404591472064.zip
sl0p: configurable pane gap (outer) and padding (inner)
Adds `ui { pane_frames { gap N; padding N } }`, both defaulting to 0 so stock configs are unaffected. gap - cells each pane gives up on every side, leaving real empty terminal between neighbouring panes (WM-style outer gaps). Two adjacent panes therefore show 2*gap between them. padding - cells between a pane's frame and its content; breathing room inside the pane without moving the frame. Design: the pane KEEPS its allocated PaneGeom. Only two things move: 1. the drawn frame, via Viewport::inset(gap), reusing the existing frame_geom_override mechanism already used for stacked panes; 2. the content, via Offset::expanded_by(gap + padding) inside set_content_offset. Because the allocation is untouched, the kasuari resize solver and mouse hit-testing need no changes at all, and a click landing in a gap still resolves to the owning pane. Content position, size and cursor are all derived from content_offset, so widening it in one place keeps every consumer consistent. Viewport::inset refuses to shrink a pane below a frame's minimum viable extent (two borders + one content cell) rather than emitting a degenerate or zero-sized frame. Negative KDL values clamp to 0 instead of wrapping. Tests cover: inset identity/shrink/recentre, the containment invariant (an inset frame never escapes its allocation), small-pane refusal, and the key safety property that content inset by gap+border+padding lands strictly inside the frame drawn at inset(gap).
Diffstat (limited to 'zellij-client')
-rw-r--r--zellij-client/src/web_client/server_listener.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/zellij-client/src/web_client/server_listener.rs b/zellij-client/src/web_client/server_listener.rs
index 5d753435..71ef5376 100644
--- a/zellij-client/src/web_client/server_listener.rs
+++ b/zellij-client/src/web_client/server_listener.rs
@@ -84,6 +84,8 @@ pub fn zellij_server_listener(
rounded_corners: config.ui.pane_frames.rounded_corners,
hide_session_name: config.ui.pane_frames.hide_session_name,
pane_title_alignment: config.ui.pane_frames.title_alignment,
+ pane_gap: config.ui.pane_frames.gap,
+ pane_padding: config.ui.pane_frames.padding,
},
};