feat(kitty): prefix tab titles with cwd basename#198
Merged
Conversation
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>
Contributor
|
| 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
- [509] https://date-fns.org/ | Failed: Network error: Unknown status code
Errors in docs/components.md
- [TIMEOUT] https://www.zsh.org/ | Timeout
Full Github Actions output
Please fix the broken links before merging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tab_title_templateso each kitty tab leads with the cwd basename, then appends· {title}only when an OSC-set title exists.tab_title_max_length 50so the cwd prefix survives truncation when titles get long.Why
Claude Code uses Node's
process.titlerather 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 plainzsh, vim, ssh, etc., the same template still works because shell integration emits OSC 2.Behaviour
~/repos/foo/barbar~/repos/foo/bar⠐ Refactor modulebar · ⠐ Refactor module/Users/lgateszshlgates · zshLong combined strings hard-truncate at 50 cells; the cwd prefix sits at the front so it always stays visible.
Test plan
chezmoi diffshows the expected 14-line addition inprivate_dot_config/private_kitty/kitty.conf.tmplchezmoi apply ~/.config/kitty/kitty.confsucceedskitty @ load-configreturns cleankitty @ ls)🤖 Generated with Claude Code