Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can you tell which pane in Tmux is focused?

Tags:

tmux

I'm starting to use tmux (I'm thinking of switching from screen), but I'm having a hard time telling which pane is focused when I split a window into multiple panes. Is there a config customization or something that can highlight the focused pane a little more explicitly?

like image 290
dan Avatar asked Feb 03 '11 17:02

dan


People also ask

How do I cycle between tmux pre built layout options?

To cycle through the windows in the inner session (the lower pane) you will need to use Ctrl-b Ctrl-b n and p . Then it would just be Ctrl-b n and p to cycle the inner windows, and Ctrl-a o to cycle the outer panes. Voila! You can now cycle through windows on both the top and bottom panes.


2 Answers

Here are the relevant settings:

pane-active-border-style fg=colour,bg=colour     Set the pane border colour for the currently active pane. 

So, try adding something like this to your ~/.tmux.conf:

set-option -g pane-active-border-style fg=blue 

That will set a blue border around the active pane. The pane-active-border-style bg=colour option can be used for a more visible solution, as well.

like image 99
Alan Christopher Thomas Avatar answered Sep 22 '22 03:09

Alan Christopher Thomas


As answered in another post it is now possible in tmux 2.1 to set the colours of individual panes. Ones can use:

set -g window-style 'fg=colour247,bg=colour236' set -g window-active-style 'fg=colour250,bg=black' 

in the ~/.tmux.conf file to show a difference between the active/inactive panes.

With Vim If you find it does not work with Vim panes, it might be down to the colourscheme you are using. First, try another colourscheme such as pablo. For further details, see the other post.

like image 36
dean. Avatar answered Sep 24 '22 03:09

dean.