Skip to content

Instantly share code, notes, and snippets.

@mario21ic
Last active September 27, 2015 04:19
Show Gist options
  • Save mario21ic/08fab2311653c7d1e261 to your computer and use it in GitHub Desktop.
Save mario21ic/08fab2311653c7d1e261 to your computer and use it in GitHub Desktop.
Script tmux to develop with 4 panels
#!/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 editor -d
tmux split-window -h -p 40 -t $session
tmux split-window -v -p 35 -t $session
tmux send-keys -t $session:0.0 'vim' C-m
tmux send-keys -t $session:0.0 'f3' C-m
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