Ask Your Question
0

tmux status line

asked 2017-07-24 22:27:55 -0500

The default tmux pane title in fedora is something like this:

username@hostname:/directory

When you have a number of pane open, it becomes painful - In debian, tmux does not behave that way. The pane title is simply:

pane-number:shell-name

So, it comes to something like this:

[0] 0: bash 1: bash* 2:bash

Is there a way to ensure tmux defaults to that behavior?

I have mucked around tmux.conf but no luck. Using powerline seems a bit too much at this stage - all I want is to make my pane title simple.

Fedora is supposed to be more bare-bones, let the user configure. Why would tmux come with all the bells and whistles all set out of box? Any ideas how to do this?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-07-25 13:17:07 -0500

muep gravatar image

I think tmux comes with these features by default because developers of tmux selected those defaults. At least I do not see anything in Fedora's packaging of tmux that would change the default settings. Fedora traditionally has not done much distribution specific customizations to the default settings so in that sense the tmux situation is very typical of Fedora.

I am not really familiar with this, but to me it seems that tmux is just displaying in the window title what bash tells it to display when it runs contents of the PROMPT_COMMAND variable. This would often be used to give you a more useful title bar in terminal windows, and tmux also reacts to the same escape sequences by updating the window title in its status bar.

If you wish to stop bash from doing this in shells under tmux, add something like this near the end of your .bashrc file:

case $TERM in
    screen*)
        unset PROMPT_COMMAND
        ;;
    *)
        # nothing
        ;;
esac

Tmux interestingly seems to tell bash in the TERM environment variable that it is screen. This is presumably because it attempts to be compatible enough and people have existing setups for screen that may be nice to use as-is.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2017-07-24 22:27:55 -0500

Seen: 172 times

Last updated: Jul 25 '17