Skip to content

Instantly share code, notes, and snippets.

@jim80net
Created June 27, 2023 23:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jim80net/bee6f5401258f087bcf0552dd9572c51 to your computer and use it in GitHub Desktop.
Save jim80net/bee6f5401258f087bcf0552dd9572c51 to your computer and use it in GitHub Desktop.
This is why I still use vim, so that I can multiplex similar repositories.
#!/usr/bin/env bash
tmux new-session -d -s multiplex
tmux select-window -t multiplex:0
INDEX=0
for i in alice bob charles denice ephrahim fantasea greg
do
tmux split-window -h
tmux select-pane -t $INDEX
tmux send-keys "cd $HOME/workspace/github.com/jim80net/$i" Enter
((INDEX+=1))
done
tmux select-layout tiled
tmux set-window-option synchronize-panes
tmux send-keys "# WARNING: Synchronize-panes on. Type \`C-b M-I\` to turn off." Enter
tmux attach-session -t multiplex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment