Created
November 2, 2012 16:34
-
-
Save cpu/4002482 to your computer and use it in GitHub Desktop.
Left Screen Tmux Setup
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/sh | |
# Create a new session called 'left' and open a ssh connection | |
tmux new-session -d -s left 'ssh danm_mud@pdox' | |
# Run 'resume' inside the ssh connection | |
tmux send-keys -t left:1 resume C-m | |
# Splice the screen in half by 50% | |
tmux splitw -h -p 50 -t left:1 'bash' | |
# Splice the rightmost half into another 50/50 split | |
tmux select-pane -R | |
tmux splitw -h -p 50 -t left:1 'bash' | |
# Make the three splits even | |
tmux select-layout even-horizontal | |
# Select the first split in the first window | |
tmux select-pane -L | |
# Create a 70% split, ssh to pdox and resume the IRC screen | |
tmux splitw -v -p 70 -t left:1 'ssh danm@pdox' | |
tmux send-keys -t left:1 'screen -Dr IRC' C-m | |
# Select the middle split | |
tmux select-pane -R | |
# Create a 90% split for VIM | |
tmux splitw -v -p 90 -t left:1 'bash' | |
# Select the rightmost split | |
tmux select-pane -R | |
# Create a 50% split | |
tmux splitw -v -p 50 -t left:1 'bash' | |
# With htop in top 50% | |
tmux select-pane -U | |
tmux send-keys -t left:1 htop C-m | |
# Back to the leftmost pane | |
tmux select-pane -R | |
# Navigate to the middle 90% split | |
tmux select-pane -R | |
tmux select-pane -D | |
# Reattach | |
tmux -2 attach-session -t left |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment