we can't link-panes, but we can use tmux nested & linked-window to achieve our goal. Here is how.
Create the session that will manage the linked panes
- create new session named shared
$ tmux new -s shared
- run waht you want, just for sure
$ top
Create the session that will contain the linked-panes, this is your main session
- create new session
$ tmux new -s main
- split pane
Ctrl+b "
- access first pane
Ctrl+b q 1
- unset $TMUX so we can nest sessions
$ unset TMUX
- create a new session within the current pane from now on Ctrl+b will access the parent not the nested session
$ tmux new
- remove status bar from the nested session
$ tmux set status off
- link window 1 of the nested session with window htop of the shared session, kill the existing pane to avoid conflict
$ tmux link-windows -s shared:0 -t 1 -k
That's it.
tmux a -t shared
- kill the nested linked-pane, for your main session
Ctrl+b x
y