Skip to content

feat(kitty): prefix tab titles with cwd basename#198

Merged
laurigates merged 1 commit into
mainfrom
feat/kitty-tab-title-prefix
May 10, 2026
Merged

feat(kitty): prefix tab titles with cwd basename#198
laurigates merged 1 commit into
mainfrom
feat/kitty-tab-title-prefix

Conversation

@laurigates
Copy link
Copy Markdown
Owner

Summary

  • Adds tab_title_template so each kitty tab leads with the cwd basename, then appends · {title} only when an OSC-set title exists.
  • Sets tab_title_max_length 50 so the cwd prefix survives truncation when titles get long.

Why

Claude Code uses Node's process.title rather than OSC 0/2, but kitty still picks the resulting title up via the window's {title} field, so both the directory prefix and Claude's task description render in the tab. For tabs running plain zsh, vim, ssh, etc., the same template still works because shell integration emits OSC 2.

Behaviour

cwd program-set title rendered tab title
~/repos/foo/bar (empty) bar
~/repos/foo/bar ⠐ Refactor module bar · ⠐ Refactor module
/Users/lgates zsh lgates · zsh

Long combined strings hard-truncate at 50 cells; the cwd prefix sits at the front so it always stays visible.

Test plan

  • chezmoi diff shows the expected 14-line addition in private_dot_config/private_kitty/kitty.conf.tmpl
  • chezmoi apply ~/.config/kitty/kitty.conf succeeds
  • kitty @ load-config returns clean
  • Live tabs render with the new prefix (verified via kitty @ ls)

🤖 Generated with Claude Code

Adds tab_title_template using tab.active_oldest_wd so the directory
name leads each tab title and survives truncation. For tabs that emit
OSC 0/2 (vim, ssh, the Claude TUI) the program-set title is appended
after a separator. Caps rendered length at 50 cells.

Claude Code uses Node's process.title rather than OSC 2, but kitty
still picks the title up via window.title, so the prefix and the
Claude task description both render.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@laurigates laurigates merged commit ed83a4d into main May 10, 2026
6 of 7 checks passed
@laurigates laurigates deleted the feat/kitty-tab-title-prefix branch May 10, 2026 15:25
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Broken Links Detected

Summary

Status Count
🔍 Total 128
✅ Successful 121
⏳ Timeouts 1
🔀 Redirected 0
👻 Excluded 5
❓ Unknown 0
🚫 Errors 1

Errors per input

Errors in exact_dot_claude/docs/prds/daily-catchup.PRD.md

Errors in docs/components.md


Please fix the broken links before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant