Skip to content

Instantly share code, notes, and snippets.

@ltpitt
Created October 28, 2021 15:36
Show Gist options
  • Save ltpitt/15713cbe231688d5aa37eeea0a10c317 to your computer and use it in GitHub Desktop.
Save ltpitt/15713cbe231688d5aa37eeea0a10c317 to your computer and use it in GitHub Desktop.
Create 4 pane in tmux via script
#!/bin/bash
tmux new-session -s "CDT" -d
tmux split-window -h
tmux split-window -v
tmux split-window -v -t 0
tmux send-keys -t %0 'echo first cdt'
tmux send-keys -t %1 'echo second cdt'
tmux send-keys -t %2 'echo third cdt'
tmux send-keys -t %3 'echo fourth cdt'
tmux -2 attach-session -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment