The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Add Borders And Titles To tmux Panes

TODO: Pull subtitle into page object

This isn't working as expected for updates with directories.

Code
set -g pane-border-format " #{pane_current_path} "

but it's not working for me right now. It sticks on one path and doesn't change. The same thing happens if I try to run the `pwd`` command via

Code
set -g pane-border-format " #(pwd) "

Borders

Add this to your config to turn on borders:

~/.tmux.conf
set -g pane-border-status top
set -g pane-border-lines double
set -g pane-border-style fg=#447755
set -g pane-active-border-style fg=#447755

Automatic Titles

Titles can be added via the config with:

~/.tmux.conf
set -g pane-border-format " #{pane_current_path} "

Manual Titles

It's also possible to set a title manually for each pane. Run this inside the pane you want to update.

Code
tmux select-pane -T "Some Title"

The sets the title to the current directory path of the pane. There's a bunch of other options in the `man tmux`` page.

The available options for `pane-border-lines`` are

I've seen some notes saying that apps might overwrite the title you set. I haven't hit that yet, but it sounds like there are ways to prevent that listed in the manual page.

Notes

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

Add Borders And Titles To tmux Panes

-- warning

This isn't working as expected for 
updates with directories. 


-- code

set -g pane-border-format " #{pane_current_path} "


-- p

but it's not working for me right now. It sticks
on one path and doesn't change. The same thing
happens if I try to run the `pwd`` command via

-- code

set -g pane-border-format " #(pwd) "

-- h2

Borders

Add this to your config to turn on borders:

-- code
-- title: ~/.tmux.conf

set -g pane-border-status top
set -g pane-border-lines double
set -g pane-border-style fg=#447755
set -g pane-active-border-style fg=#447755

-- h2

Automatic Titles

Titles can be added via the config with:

-- code
-- title: ~/.tmux.conf

set -g pane-border-format " #{pane_current_path} "


-- h2

Manual Titles

It's also possible to set a title manually
for each pane. Run this inside the
pane you want to update. 

-- code
-- bash

tmux select-pane -T "Some Title"



-- p 

The sets the title to the current directory path of the
pane. There's a bunch of other options in the `man tmux``
page. 


The available options for `pane-border-lines`` are

-- list

- single  single lines using ACS or UTF-8 characters

- double  double lines using UTF-8 characters

- heavy   heavy lines using UTF-8 characters

- simple  simple ASCII characters

- number  the pane number


-- p

I've seen some notes saying that
apps might overwrite the title you 
set. I haven't hit that yet, but
it sounds like there are ways to 
prevent that listed in the manual
page. 


-- notes

- The dracula plugin prevented the
border colors from working for me

See also: -- id: 2t021hxc


-- ref
-- title: tmux(1) 
-- subtitle: — Linux manual page
-- url: https://man7.org/linux/man-pages/man1/tmux.1.html

-- ref
-- title: Pane Title in Tmux
-- url: https://stackoverflow.com/q/9747952/102401


-- categories
-- tmux 

-- metadata
-- date: 2023-07-23 21:38:49
-- id: 2szwu3lo
-- site: aws
-- type: post
-- status: scratch