Skip to content

Commit

Permalink
Tmux - Added file to create TMUX screens
Browse files Browse the repository at this point in the history
  • Loading branch information
vcalderon2009 committed Jun 27, 2018
1 parent 91037c9 commit 145df81
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .tmuxgo
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash
SESSION=`basename $PWD`
ENVNAME='eco_mocks_catls'

# Creating new session
tmux -2 new-session -d -s $SESSION `cd $PWD`

# Renaming window
tmux rename-window -t $SESSION:0 main
# Splitting panes and windows
tmux split-window -v
tmux select-pane -t 0
tmux resize-pane -D 15
tmux select-pane -t 1
tmux split-window -h
tmux select-pane -t 2
tmux resize-pane -L 10
# Sending commands
tmux send -t $SESSION:0.0 "cd $PWD; conda activate $ENVNAME; clear;" ENTER
tmux send -t $SESSION:0.1 "cd $PWD; conda activate $ENVNAME; clear; htop" ENTER
tmux send -t $SESSION:0.2 "cd $PWD; conda activate $ENVNAME; cd ./data; clear" ENTER
#
# Creating new windows
tmux new-window -t $SESSION:1 -n 'misc'
tmux send -t $SESSION:1.0 "cd $PWD; conda activate $ENVNAME; clear;" ENTER
# Creating new windows
tmux new-window -t $SESSION:2 -n 'extras'
tmux send -t $SESSION:2.0 "cd $PWD; conda activate $ENVNAME; clear;" ENTER
#
# Selecting which window to start at
tmux select-window -t $SESSION:0
tmux select-pane -t 0
tmux -2 attach -t $SESSION

0 comments on commit 145df81

Please sign in to comment.