0

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)

2

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

set -g set-titles-string '#{pane_title}'
| improve this answer | |
  • 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 at 13:44
  • What do you think #{pane_title} does? Try what I suggested, it does exactly what you want. – Nicholas Marriott May 12 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 at 11:18
  • 1
    No worries :-). – Nicholas Marriott May 12 at 11:37

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.