diff options
| author | user <user@clank> | 2026-08-08 22:47:16 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-08 22:47:16 +0200 |
| commit | 9aa323fe6b9d15360ba54a1c73a216228664a289 (patch) | |
| tree | 9463fcffa23cbfa69c6fca0b35f4dd24341f25d0 /zellij-server/src/tab/mod.rs | |
| parent | sl0p: grayscale idle panes too (neovim stayed in colour) (diff) | |
| download | sl0ppij-9aa323fe6b9d15360ba54a1c73a216228664a289.tar.gz sl0ppij-9aa323fe6b9d15360ba54a1c73a216228664a289.tar.xz sl0ppij-9aa323fe6b9d15360ba54a1c73a216228664a289.zip | |
sl0p: optionally hide the 'Pane #N' placeholder title
`ui { pane_frames { hide_default_pane_names true } }`, default false.
A pane now shows no title at all until something actually names it: the user
renaming it (including by double-clicking the title row) or the running
program setting a title. Upstream always shows an auto-generated 'Pane #N'.
Implemented by tracking whether pane_title is still the constructor's
placeholder, NOT by matching the string: a program that legitimately titles
itself 'Pane #3' must not be mistaken for an unnamed pane. set_title clears
the flag, since something then chose that title.
current_title reads the option at render time rather than baking an empty
title in at construction, so it hot-reloads and turning the option back off
restores the placeholder on existing panes.
Display precedence is unchanged and now explicit in the code:
user-given name > title set by the running program > placeholder
render_terminal_title already fell back to an empty string rather than the
placeholder, so the terminal WINDOW title is unaffected.
Empty titles were already handled by the frame renderer
(render_title_left_side returns None for an empty title), including the
sl0p centred/right alignment path.
Baselines held: zellij-server 1436/30, zellij-utils 436/5.
Diffstat (limited to 'zellij-server/src/tab/mod.rs')
| -rw-r--r-- | zellij-server/src/tab/mod.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/zellij-server/src/tab/mod.rs b/zellij-server/src/tab/mod.rs index 18945a68..08ee4bc9 100644 --- a/zellij-server/src/tab/mod.rs +++ b/zellij-server/src/tab/mod.rs @@ -778,6 +778,7 @@ pub trait Pane { _gap_y: usize, _padding: zellij_utils::data::PanePadding, _inactive_grayscale: u8, + _hide_default_pane_names: bool, ) { } fn set_should_be_suppressed(&mut self, _should_be_suppressed: bool) {} @@ -7448,18 +7449,20 @@ impl Tab { gap_y: usize, padding: zellij_utils::data::PanePadding, inactive_grayscale: u8, + hide_default_pane_names: bool, ) { self.style.pane_title_alignment = title_alignment; self.style.pane_gap_x = gap_x; self.style.pane_gap_y = gap_y; self.style.pane_padding = padding; self.style.inactive_pane_grayscale = inactive_grayscale; + self.style.hide_default_pane_names = hide_default_pane_names; self.floating_panes - .update_pane_frame_layout(title_alignment, gap_x, gap_y, padding, inactive_grayscale); + .update_pane_frame_layout(title_alignment, gap_x, gap_y, padding, inactive_grayscale, hide_default_pane_names); self.tiled_panes - .update_pane_frame_layout(title_alignment, gap_x, gap_y, padding, inactive_grayscale); + .update_pane_frame_layout(title_alignment, gap_x, gap_y, padding, inactive_grayscale, hide_default_pane_names); for (_, pane) in self.suppressed_panes.values_mut() { - pane.update_frame_layout(title_alignment, gap_x, gap_y, padding, inactive_grayscale); + pane.update_frame_layout(title_alignment, gap_x, gap_y, padding, inactive_grayscale, hide_default_pane_names); } } pub fn update_arrow_fonts(&mut self, should_support_arrow_fonts: bool) { |
