Skip to content

Instantly share code, notes, and snippets.

@milanboers
Last active September 28, 2017 12:10
Show Gist options
  • Save milanboers/068190c62271e716a163c7cbba3c330d to your computer and use it in GitHub Desktop.
Save milanboers/068190c62271e716a163c7cbba3c330d to your computer and use it in GitHub Desktop.
Execute 4 commands in split screen in tmux
#!/bin/bash
# Usage: ./multi4.sh first_command second_command third_command fourth_command
tmux send-keys "$1" 'C-m'
tmux split-window -v
tmux send-keys "$2" 'C-m'
tmux split-window -h
tmux send-keys "$3" 'C-m'
tmux select-pane -U
tmux split-window -h
tmux send-keys "$4" 'C-m'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment