Skip to content

feat: add configurable terminal window title#5293

Open
rabin-io wants to merge 1 commit into
jesseduffield:masterfrom
rabin-io:SetWindowTitle
Open

feat: add configurable terminal window title#5293
rabin-io wants to merge 1 commit into
jesseduffield:masterfrom
rabin-io:SetWindowTitle

Conversation

@rabin-io
Copy link
Copy Markdown

Add a new gui.terminalTitle config option that sets the terminal
window title when opening a repository. The default format is
lazygit::{{repoName}} (e.g., lazygit::myproject).

Features:

  • Configurable title format with {{repoName}} placeholder
  • Set to empty string to disable terminal title updates
  • Hot-reloadable: title updates when config file changes
  • Cross-platform support using tcell's SetTitle()
  • Windows legacy console fallback using cmd.exe's title command

Example config:

gui:
  terminalTitle: "lazygit::{{repoName}}"
  # or custom formats:
  # terminalTitle: "[{{repoName}}] lazygit"
  # terminalTitle: ""  # disable

@rabin-io rabin-io marked this pull request as ready for review February 16, 2026 21:25
@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

@rabin-io
Copy link
Copy Markdown
Author

rabin-io commented Apr 7, 2026

Hi @stefanhaller

With the recent update to the AI contribution policy, would you prefer I close this PR? For what it's worth, I've been using this patch daily in my own Lazygit workflow, and it’s been very stable, but I understand if it can't be merged under the new rules.

image

Add a `gui.terminalTitle` config option (default: `lazygit::{{repoName}}`)
that sets the terminal window title via ANSI escape sequences through
gocui.Screen.SetTitle(). The title updates on startup and when switching
repos. Control characters are sanitized to prevent escape sequence
injection. Set to empty string to disable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant