How can you determine which area in Tmux is concentrated?

I'm starting to use tmux (I'm thinking of switching from the screen), but it's hard for me to say which panel is focused when I split a window into several windows. Is there a configuration setting or something that can highlight the selected area a little more explicitly?

+73
tmux
03 Feb '11 at 17:52
source share
4 answers

The following are the relevant settings:

pane-active-border-bg colour pane-active-border-fg 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-fg blue 

This will set a blue frame around the active panel. The pane-active-border-bg option can also be used for a more visible solution.

+85
Feb 03 '11 at 18:22
source share

As indicated in another post , now in tmux 2.1 you can now set the colors of individual panels. They 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 the difference between the active / inactive panels.

+18
Nov 06 '15 at 8:11
source share

Set status-left and use the #P character pair, which is the panel number. You probably want to include more than just the panel number in the status bar, but here is an example of a line that you would add to your ~/.tmux.conf only for the panel number:

 set-option -g status-left '#P' 

See the tmux man page for more character pairs: http://manpages.ubuntu.com/manpages/precise/en/man1/tmux.1.html

+12
Feb 03 '11 at 18:05
source share

One solution that works for me is to add a display panel at the end of the hotkey for the panel. This displays all panel numbers, while the current panel has a different color. You can also use <escape_key> + q to display panel numbers.

I use alt+h/j/k/l to switch between panels, and I use the following binding.

 bind -n Mj select-pane -D \; display-pane bind -n Mk select-pane -U \; display-pane bind -n Mh select-pane -L \; display-pane bind -n Ml select-pane -R \; display-pane 
+3
Aug 27 '15 at 6:32
source share



All Articles