Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


#71 pane colours

Thomas Jachmann

It would be great to be able to set the background colour of panes. This would allow for:

  • scripts to change the background colour of a pane (eg an ssh wrapper script that changes the background so you get an immediately visible hint that you're on another computer)
  • highlight the focused pane/dim the inactive panes

So we'd need something like:

  • pane-bg
  • pane-active-bg
  • pane-last-bg (for completeness' sake)
  • maybe also *-fg


  • Thomas Adam
    Thomas Adam

    This is not possible, and has problems implementing it anyway, not to mention we'd have to redraw the panes all the time, this will be slow over SSH, say.

    I'm not in favour of this at all.

  • I probably out myself as being naive, but couldn't this be done in the same way as drawing the background color of things like the status bar and the pane borders? These don't slow tmux down, right?

    I understand that implementing a feature that would make tmux slow or even unresponsive in certain circumstances is not an option. But if this could be prevented it would open quite a lot of opportunities.

  • wes

    One solution for the forgetting you're ssh'd problem is to change the prompt on
    the remote machine. I do something like this:

    [[ -n $SSH_TTY ]] && \
        PS1='\[\e[1m\][\u@\h \W]\$\[\e[0m\] ' || PS1='[\u@\h \W]\$ '

    Which just makes the prompt bold. You could do something more drastic if you
    wanted. HTH.

    • Thanks wes, that would involve the configuration of quite some machines though. And on some customer's machines I'm not even the only one using that account so unfortunately it's not an option.

      Anyway, this was just an example of the usefulness of such a feature, I can think of many more.

      I'm still in hope that this gets some attention some day.

  • Background colours are hard because unless the terminal supports BCE (and not all do) you have to draw the whole lot with spaces.

    Did you consider just changing the bg colour of the window in the status line? You can do that with a ssh wrapper script easily enough.

    • OK, that might be a solution to my current needs, although it's not as easily recognizable. Thanks for your hint.

    • status: open --> closed
    • Milestone: -->
  • Lack of BCE is known, if we ever do BCE this can be reconsidered.

  • Just to document this for anyone coming to this ticket from a search engine: I just stumbled upon http://sourceforge.net/p/tmux/tmux-code/ci/ee123c248951450100475717f5bd45f292d9bb4d/ which seems to add what I need. I'm excited and can't wait for the next release.

    • It won't be in the next release (2.0), it'll be in tmux 2.1.

      • Thanks for the information. I wouldn't mind switching to the HEAD version just for this feature.

        Actually, I tried but got an "Unknown option: window-style" but that's OT here. I'll keep trying. :)