Custom Dynamic Tab Names #10156

Closed
opened 2026-01-31 02:13:58 +00:00 by claunia · 1 comment
Owner

Originally created by @dirthsj on GitHub (Aug 13, 2020).

Description of the new feature/enhancement

I would like to configure dynamic tab names per profile. For example, I have a git profile and it would be very useful for the tab name to list the current repository.

Proposed technical implementation details (optional)

A simple implementation would be a config setting which points to an executable script (eg. tab_name.sh) and a list of events that trigger the script to execute or how often to execute it. When executed, the script will write the desired text to stdout.

Originally created by @dirthsj on GitHub (Aug 13, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement I would like to configure dynamic tab names per profile. For example, I have a git profile and it would be very useful for the tab name to list the current repository. # Proposed technical implementation details (optional) A simple implementation would be a config setting which points to an executable script (eg. `tab_name.sh`) and a list of events that trigger the script to execute or how often to execute it. When executed, the script will write the desired text to `stdout`.
Author
Owner

@DHowett commented on GitHub (Aug 14, 2020):

Thanks for the request! The absolute best way to have a dynamic title is to just plug the title generator right into your shell -- perhaps your shell prompt or something that runs very often. It's not going to be broadly possible for us to run the right thing in the right context for you... (like, directory, env vars, parent process, using the right WSL distribution or Cygwin or MSYS2 for the sh file, etc.)
But, there's an absolute wealth of resources on how to have a custom dynamic title for any shell you might use :)

Here's some examples:

We've also got a deliverable tracking the terminal automatically creating a dynamic title based on things that it can know here: #1320.

Closing as external/question/answered 😄

@DHowett commented on GitHub (Aug 14, 2020): Thanks for the request! The absolute best way to have a dynamic title is to just plug the title generator right into your shell -- perhaps your shell prompt or something that runs very often. It's not going to be broadly possible for us to run the right thing _in the right context_ for you... (like, directory, env vars, parent process, using the right WSL distribution or Cygwin or MSYS2 for the `sh` file, etc.) But, there's an absolute wealth of resources on how to have a custom dynamic title for any shell you might use :) Here's some examples: * [dynamic title in bash](https://unix.stackexchange.com/questions/104018/set-dynamic-window-title-based-on-command-input) * [dynamic title for all xterm-compatibles](https://unix.stackexchange.com/questions/9007/display-command-in-xterm-titlebar) * [dynamic title for zsh](https://stackoverflow.com/questions/20727730/dynamic-window-title-in-urxvt-with-zsh) * [setting a title from powershell](https://devblogs.microsoft.com/scripting/powertip-change-the-powershell-console-title/) We've also got a deliverable tracking the terminal automatically creating a dynamic title based on things that it _can_ know here: #1320. Closing as external/question/answered :smile:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10156