Last active
March 12, 2019 17:05
-
-
Save yunusemreayhan/b19b773da269e4c758bdc981e76ff6f8 to your computer and use it in GitHub Desktop.
tmux conf one session multiple windows
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 | |
tmux start-server | |
dev_session_name="dev" | |
tmux has-session -t $dev_session_name | |
if (( $? )) ; then | |
tmux new-session -d -s ${dev_session_name} -n src | |
tmux send-keys "ses 0 command" C-m | |
tmux new-window -t ${dev_session_name}:1 -n sblock | |
tmux send-keys "ses 1 command" C-m | |
tmux new-window -t ${dev_session_name}:2 -n shal | |
tmux send-keys "ses 2 command" C-m | |
else | |
echo "dev session already exist" | |
fi | |
tmux attach-session -t ${dev_session_name} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment