You could put this on your ~/.tmux.conf
set -g status-right-length 80
set -g status-right '#(exec tmux ls| cut -d " " -f 1-3 |tr "\\n" "," )'
This will list all sessions, and "wrap" some of the information to make it fill in one line ;)
Now, on your right site of the tmux bar, it will show the tmux sessions and the number of opened windows. The separation will be represented by ;
Edit: Add the folowing line on your ~/.tmux.conf
, so you can reload the configuration on the fly:
bind r source-file ~/.tmux.conf
Now, just hit <Control + B , r >
and your are good to go.
Add this to your ~/.tmux.conf
:
set-option -g default-shell /bin/bash
unbind Up
unbind Down
unbind Right
unbind Left
bind Up run-shell "if [ $(tmux display-message -p '#{pane_at_top}') -ne 1 ]; then tmux select-pane -U; fi"
bind Down run-shell "if [ $(tmux display-message -p '#{pane_at_bottom}') -ne 1 ] ; then tmux select-pane -D; fi"
bind Right run-shell "if [ $(tmux display-message -p '#{pane_at_right}') -ne 1 ]; then tmux select-pane -R; fi"
bind Left run-shell "if [ $(tmux display-message -p '#{pane_at_left}') -ne 1 ]; then tmux select-pane -L; fi"
Basically, this should run with tmux versions 2.6 + (after which they added the pane_at_top, pane_at_bottom, pane_at_left, pane_at_right environment variables. For tmux < v2.6, I'm not entirely sure how you could implement this.
Further more, if you want to launch a custom-shell, do it through set-option -g default-command fish
(or zsh or csh or whatever). As an alternative, if you want to use a non-bash shell as your tmux default shell, set it as such (set-option -g default-shell
) and then you can code out the logic above in the shell script of your choice. However, (as was in my case) using certain shells doesn't give you the convenience of one-liner if commands (or it might just be I don't know enough about certain shells, or maybe multiple lines do work in run-shell.
Source: github Issues thread that I started
Best Answer
This comes up on the mailing list every once in a while.
No, it is not possible to have a pane in more than one window.
The internal design of tmux allows for windows to be multiple sessions, but a pane can only belong to a single window.