-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tmux - Added file to create TMUX screens
- Loading branch information
1 parent
91037c9
commit 145df81
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
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 |