Created
April 16, 2013 16:27
-
-
Save thameera/5397373 to your computer and use it in GitHub Desktop.
Sample bash script to draw a tmux layout
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 | |
SN="tmuxwork" | |
tmux has-session -t $SN &>/dev/null | |
if [ $? != 0 ] | |
then | |
tmux new -s $SN -n conf -d | |
tmux new-window -t $SN:2 -n misc | |
tmux select-window -t $SN:1 | |
tmux send-keys "vi ~/.tmux.conf" C-m | |
tmux split-window -h -p 50 # split vertically by 50% | |
tmux select-pane -t 0 | |
fi | |
tmux -2 attach -t $SN |
Glad to hear you found it useful!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is great, thanks for sharing.
It inspired me to add my own layout scripts to tmux workflows.