If you have made changes to your tmux configuration file in the ~/.tmux.conf
file, it shouldn’t be necessary to start the server up again from scratch with
kill-server. Instead, you can prompt the current tmux session to reload the
configuration with the source-file command.
This can be done either from within tmux, by pressing Ctrl+B and then : to
bring up a command prompt, and typing:
:source-file ~/.tmux.conf
Or simply from a shell:
$ tmux source-file ~/.tmux.conf
This should apply your changes to the running tmux server without affecting the sessions or windows within them.
Or you can just add keybinding to your tmux.conf: bind-key r source-file ~/.tmux.conf \; display “Config reloaded!”
I found this (https://github.com/brandur/tmux-extra) makes session management much nicer. It allows you to create a named session which you can then connect/disconnect as normal, but crucially you can connect to it more than once and have each connection operate independently (i.e. looking at a different window). My attempts to achieve the same just using tmux always left me with both connections switching windows in sync.
Chris,
You can link 2 sessions together and have them behave independently (a bit like screen -x) using the -t option of the new-session command:
That’s in fact what the shell script you mentioned in your post does.
Cyril