Pane Title in Tmux

前端 未结 9 738
时光说笑
时光说笑 2020-12-22 16:56

On my local machine I\'ve got 3 node.js instances running simultaneously. Each has it\'s own pane in a tmux window called \"servers\". The problem is that it\'s not that eas

相关标签:
9条回答
  • 2020-12-22 17:20

    Yes there is such a command: tmux. Give your session a name and it will be displayed in an inner status bar:

    TMUX=0 tmux new-session -s my-new-session
    
    0 讨论(0)
  • 2020-12-22 17:22

    A gif is worth a thousand words. (source)

    tmux-xpanes is a tmux-based terminal divider, which supports displaying title for each pane through the newly added -t option.

    0 讨论(0)
  • 2020-12-22 17:24

    This is not helpful in the short-term, but there is a feature request for per-pane titles in tmux: http://sourceforge.net/tracker/?func=detail&aid=3495916&group_id=200378&atid=973265#

    In the meantime, as others mentioned, nesting tmux works decently.

    0 讨论(0)
  • 2020-12-22 17:29

    I'm working on the pane status bar for tmux - ticket. My development branch can be found here on github: https://github.com/jonathanslenders/tmux

    Right now, this already adds a working rename-pane "title" command. There are still some bugs, and the API will improve. The idea is to create a status bar per pane, which can have some formatting, like the session status bar. Like the rest of tmux, everything should become scriptable, and customizable. When finished and stable, it will probably be included in the official tmux.

    0 讨论(0)
  • 2020-12-22 17:32

    I am using tmux version 2.3, I think border style is not supported in previous versions. this is what worked for me:

    For each pane set the title:

    printf '\033]2;My Pane Title\033\\'
    

    Then:

    tmux set -g pane-border-format "#{pane_index} #T"
    
    0 讨论(0)
  • 2020-12-22 17:33

    Since tmux 2.6 you can do:

    $ 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
    

    You can see title per pane in a status bar with:

    $ tmux set pane-border-status bottom      # For current window
    $ tmux set -g pane-border-status bottom   # For all windows
    

    Disable status bar with:

    $ tmux set pane-border-status off       # For current window
    $ tmux set -g pane-border-status off    # For all windows
    
    0 讨论(0)
提交回复
热议问题