How can I set the iTerm2 window title to be the same no matter which pane is selected? I'm aware that the iTerm2 window title can be set with

echo -ne "\033]0;"Title goes here"\007"


but that appears to only set the title for a single pane. When I switch panes, the window title is changed.

How can I quickly/automatically set the window title to be the same for every pane?
If you are just looking for a static title you can add that line to your ~/.bash_profile. Just be sure to source it to load it:

source ~/.bash_profile


Otherwise you could use an alias. Those are also added in your ~/.bash_profile as well:

alias title1='echo -ne "\033]0;"Title goes here"\007"'
alias title2='echo -ne "\033]0;"Other Title goes here"\007"'


Hope that helps!