Last active
April 6, 2016 00:19
-
-
Save mario21ic/574e3ec58417c77f2186 to your computer and use it in GitHub Desktop.
tmux_4panel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z $1 ]; | |
then | |
session=$(basename `pwd`) | |
else | |
session=$1 | |
fi | |
tmux has-session -t $session | |
if [ $? != 0 ] | |
then | |
tmux new-session -s $session -n main -d | |
tmux split-window -v -t $session | |
tmux split-window -h -t $session | |
tmux split-window -h -t $session:0.0 | |
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