1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-03 07:08:01 +00:00

Add Display Titles For Each Pane In A Window as a tmux TIL

This commit is contained in:
jbranchaud
2022-11-09 09:27:49 -06:00
parent d26be13cd4
commit b589f1ced8
2 changed files with 41 additions and 1 deletions

View File

@@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
For a steady stream of TILs, [sign up for my newsletter](https://crafty-builder-6996.ck.page/e169c61186).
_1266 TILs and counting..._
_1267 TILs and counting..._
---
@@ -1142,6 +1142,7 @@ _1266 TILs and counting..._
- [Create A Named tmux Session](tmux/create-a-named-tmux-session.md)
- [Create A New Session In A New Server](tmux/create-a-new-session-in-a-new-server.md)
- [Cycle Through Layouts](tmux/cycle-through-layouts.md)
- [Display Titles For Each Pane In A Window](tmux/display-titles-for-each-pane-in-a-window.md)
- [Enabling Vi Mode](tmux/enabling-vi-mode.md)
- [Get Mouse Copy/Paste Working In Kitty](tmux/get-mouse-copy-paste-working-in-kitty.md)
- [Hiding The Status Bar](tmux/hiding-the-status-bar.md)

View File

@@ -0,0 +1,39 @@
# Display Titles For Each Pane In A Window
One of the main reasons I use `tmux` is to be able to organize the various
development servers and tools I have to run for a given project. They can be
spread across several windows in the same session. Or for ease of access, they
can all be split across panes in a single window.
In that latter case, I recently ran into an issue where the server output in
each pane looked similar enough that I couldn't tell which was which. What I
need is titles for each pane that tell me what is running and where.
`tmux` has pretty solid support for just this out-of-the-box with
`pane-border-status`.
Hit `<prefix>:` to issue the following command to `tmux`:
```
:set pane-border-status top
```
Or issue the command from one of your pane's terminal prompts:
```
$ tmxu set pane-border-status top
```
Either way, it will replace the top border line with text telling you the pane
number, the directory, and the last run command in that pane. This is just the
context I need to differentiate each.
This will only set it for the current window.
If you want to turn it back off:
```
:set pane-border-status off
```
[source](https://stackoverflow.com/a/37602055/535590)