Skip to content

Instantly share code, notes, and snippets.

@ThisIsntMyId
Created February 5, 2022 12:09
Show Gist options
  • Save ThisIsntMyId/4550fe27e1b53f60311eb4bbc49e8ed4 to your computer and use it in GitHub Desktop.
Save ThisIsntMyId/4550fe27e1b53f60311eb4bbc49e8ed4 to your computer and use it in GitHub Desktop.
tmux generator
#!/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