-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add a tmux script to start the "standard" dev setup I am using
- Loading branch information
1 parent
ea1c0ce
commit eecbbc6
Showing
2 changed files
with
38 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
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,26 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Set Session Name | ||
SESSION="Glutinum" | ||
SESSIONEXISTS=$(tmux list-sessions | grep $SESSION) | ||
|
||
# Only create tmux session if it doesn't already exist | ||
if [ "$SESSIONEXISTS" = "" ]; then | ||
# Start New Session with our name | ||
tmux new-session -d -s $SESSION | ||
|
||
# Run 'echo "hello world"' in the first pane | ||
tmux send-keys -t $SESSION "./build.sh test specs --generate-only --watch" C-m | ||
|
||
# Split the window horizontally to create a second pane | ||
tmux split-window -h -t $SESSION | ||
|
||
# Run 'pwd' in the second pane | ||
tmux send-keys -t $SESSION:0.1 "./build.sh web --watch" C-m | ||
|
||
# Attach to the tmux session | ||
tmux attach -t $SESSION:0.0 | ||
fi | ||
|
||
# Attach Session, on the Main window | ||
tmux attach-session -t $SESSION:0.0 |