Created
October 2, 2017 11:58
-
-
Save mehdisadeghi/82e6e0a564b4f958e89896eb3a0ed268 to your computer and use it in GitHub Desktop.
Byobu startup file
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
#!/bin/bash | |
if [ -z "$(byobu list-sessions | grep code)" ] | |
then | |
byobu-tmux new-session -d #-t code # creates a new detached Byobu session | |
# Jupyter Window | |
byobu-tmux rename-window jupyter # Byobu comes up with one window, so rename that | |
byobu-tmux send-keys -t 0 'zsh' 'C-m' | |
byobu-tmux send-keys -t 0 'PYTHONHOME=$HOME jupyter notebook --no-browser --ip pc-p561' 'C-m' | |
# Jupyter ipcluster | |
byobu-tmux new-window | |
byobu-tmux rename-window ipcluster # Byobu comes up with one window, so rename that | |
byobu-tmux send-keys -t 1 'zsh' 'C-m' | |
byobu-tmux send-keys -t 1 'PYTHONHOME=$HOME ipcluster start --profile=ssh --debug' 'C-m' | |
# MongoDB Window | |
byobu-tmux new-window | |
byobu-tmux rename-window mongodb | |
byobu-tmux send-keys -t 2 'zsh' 'C-m' | |
byobu-tmux send-keys -t 2 'mongod --dbpath ~/data/db/' 'C-m' | |
# MongoDB Admin Window | |
byobu-tmux new-window | |
byobu-tmux rename-window mongoadmin | |
byobu-tmux send-keys -t 3 'zsh' 'C-m' | |
byobu-tmux send-keys -t 3 'cd /local_data/sade/src/adminMongo && npm start' 'C-m' | |
# routing Window | |
byobu-tmux new-window | |
byobu-tmux rename-window routing | |
byobu-tmux send-keys -t 4 'zsh' 'C-m' | |
byobu-tmux send-keys -t 4 'cd /home/sade/projects/service.routing && lein run' 'C-m' | |
# random | |
byobu-tmux new-window | |
byobu-tmux rename-window random | |
byobu-tmux send-keys -t 5 'zsh' 'C-m' | |
fi | |
# Enter Byobu | |
#byobu-tmux attach -t code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment