Skip to content

Instantly share code, notes, and snippets.

@mario21ic
Created April 6, 2016 00:19
Show Gist options
  • Save mario21ic/dc633e2c9e069bb1e0dc5d9368ef8d02 to your computer and use it in GitHub Desktop.
Save mario21ic/dc633e2c9e069bb1e0dc5d9368ef8d02 to your computer and use it in GitHub Desktop.
tmux_8panel
#!/bin/bash
SESSION=$(basename `pwd`)
if [ -n "$1" ];
then
SESSION=$1
fi
tmux has-session -t $SESSION
if [ $? != 0 ]
then
tmux new-session -s $SESSION -n main -d
tmux split-window -h -t $SESSION
tmux split-window -v -p 50 -t $SESSION:0.0
tmux split-window -v -p 50 -t $SESSION:0.0
tmux split-window -v -p 50 -t $SESSION:0.2
tmux split-window -v -p 50 -t $SESSION:0.1
tmux split-window -v -p 50 -t $SESSION:0.1
tmux split-window -v -p 50 -t $SESSION:0.5
tmux select-pane -t $SESSION:0.0
fi
tmux -2 attach -t $SESSION
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment