Skip to content

Instantly share code, notes, and snippets.

@obihann
Last active March 1, 2018 12:45
Show Gist options
  • Save obihann/642a9a4737d2b0922a3a to your computer and use it in GitHub Desktop.
Save obihann/642a9a4737d2b0922a3a to your computer and use it in GitHub Desktop.
tmux `sticky` panes

TMUX sticky panes

Step 1

Create the session that will manage the nested/sticky panes

  • create new session named shared

      $ tmux new -s shared
    
  • rename current window

      Ctrl+b : rename-window top
    
  • open htop for monitoring

      $ htop
    

Step 2

Create the session that will contain the nested/sticky 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:top -t 1 -k
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment