Add optional window title bars for window splits#9450
Add optional window title bars for window splits#9450mcrmck wants to merge 2 commits intokovidgoyal:masterfrom
Conversation
Add an optional title bar that displays above or below each window pane when multiple windows are visible in a tab. This is similar to tmux's pane-border-format or Terminator's pane title bars. New configuration options: - pane_title_bar: none/top/bottom (default: none) - pane_title_template: f-string template (same syntax as tab_title_template) - active_pane_title_template: override for active pane - pane_title_bar_active_fg/bg: colors for active pane title - pane_title_bar_inactive_fg/bg: colors for inactive pane titles - pane_title_bar_align: left/center/right text alignment The title bars are rendered using virtual Screen objects registered with the GPU, following the same model as the tab bar. Title bars are automatically hidden when only a single window is visible. Ref: kovidgoyal#9448 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Before I find time to review the actual code, just some high level comments.
|
- Rename all options from pane_title_* to window_title_*
- Use foreground/background instead of fg/bg in color option names
- Change color options to to_color_or_none defaulting to None,
falling back to corresponding tab bar colors
- Add bell_symbol, activity_symbol, progress_percent template vars
using existing bell_on_tab and tab_activity_symbol options
- Add custom script support via window_title_bar.py in config dir
(draw_window_title function exposed as {custom} in templates)
- Update C structs, Python references, and regenerate config files
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Thank you for your feedback. I have pushed a commit addressing all four points:
|
Summary
Screenobjects (same model as the tab bar) and automatically hidden when only a single window is visibleConfiguration options
Implementation
state.h,state.c,child-monitor.c): EachWindowstruct gains awindow_title_render_datafield with its own VAO. Cell data is uploaded to the GPU inprepare_to_render_os_windowand drawn inrender_prepared_os_window.layout/base.py):_apply_window_title_bars()shrinks each visible window's geometry by one cell height to make room for the title bar.window_title_bar.py):WindowTitleBarManagermanages oneWindowTitleBarScreenper visible window, handling template evaluation, SGR formatting, alignment, and cleanup.tabs.py): Title bars update on layout changes (relayout_borders) and title changes (title_changed).window_title_bar.pyscript in their kitty config directory with adraw_window_title(data)function, exposed as{custom}in templates (same pattern as tab bar'stab_bar.py).Changes since initial submission
Addressed all reviewer feedback from @kovidgoyal:
pane→windowin all option names and internalsforeground/backgroundinstead offg/bgin color option namesto_color_or_none, default toNone, fall back to corresponding tab bar colors (active_tab_foreground, etc.) — no theme updates neededwindow_title_bar.pyin config dir (mirrorstab_bar.pypattern)bell_on_tabandtab_activity_symboloptions, matching the tab bar's default templateTest plan
Ref: #9448
🤖 Generated with Claude Code