when I use my shell, it sets automatically the title of the terminal (emulator) window dynamically. When I now use tmux, this window title set by the shell (bash in my case) is displayed on the right side of the statusline (by default) and for the terminal (emulator) window tmux offers some functionality to set this title as well (set-titles on).

Now I need to pass the title set by the shell on to the terminal(emulator) window again (displaying the shell-set title of the currently in tmux active pane.

How is this possible? (if it helps, I always have -${HOSTNAME} - ${PWD} setting the title to hostname - current directory)

1 Answer 1


You can use the pane_title format. For example, set set-titles-string with:

set -g set-titles-string '#{pane_title}'
  • Yes of course, but up to now I don't know how to get f.e. the current directory (and the most preferable solution would be of course to be able to just pass that pane title inside of tmux just one step further to the terminal emulator.
    – atticus
    May 11, 2020 at 13:44
  • 1
    What do you think #{pane_title} does? Try what I suggested, it does exactly what you want. May 12, 2020 at 9:56
  • Oh sorry, I thought you'd mean by that I should enter my pane title at this place. And I didn't see this line in man tmux: pane_title #T Title of pane (can be set by application). I'm really sorry
    – atticus
    May 12, 2020 at 11:18
  • 1
    No worries :-). May 12, 2020 at 11:37
  • Looks like tmux includes pane_title in the set-titles-string by default, now. set -g set-titles on is now sufficient to pass through the child title to the terminal emulator. Mar 25 at 3:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.