Created
February 5, 2022 12:09
-
-
Save ThisIsntMyId/4550fe27e1b53f60311eb4bbc49e8ed4 to your computer and use it in GitHub Desktop.
tmux generator
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/sh | |
if [ -z "$1" ] | |
then | |
echo "No collection slug provided" | |
exit 1 | |
fi | |
coll_slug=$1 | |
tmux new-session -s trx_${coll_slug} -d | |
tmux split-window -t trx_${coll_slug} -h | |
tmux split-window -t trx_${coll_slug}.0 -v | |
tmux split-window -t trx_${coll_slug}.2 -v | |
tmux set-option -t trx_${coll_slug}:0 -w mouse "on" | |
tmux set-option -t trx_${coll_slug}:0 -w synchronize-panes "on" | |
tmux send-keys -t trx_${coll_slug} "cd /var/www/data-sourcing/local-data-sourcing" "C-m" | |
tmux set-option -t trx_${coll_slug}:0 -w synchronize-panes "off" | |
tmux send-keys -t trx_${coll_slug}.0 "python3 transactions/historical_transactions.py --collection_slug=${coll_slug} --event_type=created --historical" "C-m" | |
tmux send-keys -t trx_${coll_slug}.1 "python3 transactions/historical_transactions.py --collection_slug=${coll_slug} --event_type=successful --historical" "C-m" | |
# tmux send-keys -t trx_${coll_slug}.2 "python3 transactions/historical_transactions.py --collection_slug=${coll_slug} --event_type=bid_entered --historical" "C-m" | |
tmux send-keys -t trx_${coll_slug}.2 "python3 transactions/historical_transactions.py --collection_slug=${coll_slug} --event_type=offer_entered --historical" "C-m" | |
tmux send-keys -t trx_${coll_slug}.3 "python3 transactions/historical_transactions.py --collection_slug=${coll_slug} --event_type=transfer --historical" "C-m" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment