Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The process for adding several colors to the title of a tmux pane involves using escape sequences to set the colors. Here are the steps:

  1. Open the tmux pane whose title you want to color.
  2. Press Ctrl + b, release it and then press Shift + : to enter tmux command mode.
  3. Type the following command: set -g pane-border-format "\033[COLOR1;COLOR2;COLOR3m#{pane_title}\033[0m", where COLOR1, COLOR2, and COLOR3 are the color codes you want to use. You can find a list of color codes here: https://en.wikipedia.org/wiki/ANSIescapecode#Colors
  4. Press Enter to execute the command.
  5. The title of the pane should now be colored with the specified colors.

Note: If you want to add colors to the prefix of the tmux pane (e.g. the session name), use the status-format option instead of pane-border-format.