Pane Title in Tmux .conf File

330 Views Asked by At

I'm setting up a window template script in the tmux.conf file and want to have a statement that add a pane title. In a related post 2019 the solution is partially provided by adding a pane title from the command line - link. A solution is quoted below:-

 tmux select-pane -t {pane} -T {title}

    Examples:
    tmux select-pane -T title1          # Change title of current pane
    tmux select-pane -t 1 -T title2     # Change title of pane 1 in current window
    tmux select-pane -t 2.1 -T title3   # Change title of pane 1 in window 2`

How do I translate this into a line in the .tmux.conf file?

I've tried the following;

send-keys 'tmux select-pane -t 1 -T titles' C-m ;
select-pane -t 1 -T titles C-m ;
select-pane -t 1-T titles

1

There are 1 best solutions below

0
Leighton On

Finally - although changes to the config file seem to be effected by the continuum & reurrect plugins I found that in order for this to work:-

    select-pane -T title1          # Change title of current pane
    select-pane -t 1 -T title2     # Change title of pane 1 in current window
    select-pane -t 2.1 -T title3   # Change title of pane 1 in window 2

You had to first add the following to the conf file:-

    set -g pane-border-format "#{pane_index} #{pane_current_command}"