From 3432039f53a66678f5994bdc3833da3149c99e45 Mon Sep 17 00:00:00 2001 From: openoms Date: Thu, 21 Jul 2022 14:44:00 +0100 Subject: [PATCH] nokyc sample with tmuxinator --- nokyc/README.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 nokyc/README.md diff --git a/nokyc/README.md b/nokyc/README.md new file mode 100644 index 0000000..fdd2ec6 --- /dev/null +++ b/nokyc/README.md @@ -0,0 +1,51 @@ +# Run the nokyc scripts in every 10 minutes in a tmux window + +Using: +* https://github.com/j4imefoo/nokyc +* https://github.com/tmuxinator/tmuxinator + + +## Install +``` +sudo apt-get install tmux git rubygems -y + +cd +git clone https://github.com/j4imefoo/nokyc +cd nokyc +pip install -r requirements.txt + +# install https://github.com/tmuxinator/tmuxinator +sudo gem install tmuxinator +sudo wget https://raw.githubusercontent.com/tmuxinator/tmuxinator/master/completion/tmuxinator.bash -O /etc/bash_completion.d/tmuxinator.bash +echo "export EDITOR=$(which nano)" >> ~/.bashrc + +# tmuxinator config +echo "\ +name: nokyc +root: ~/ + +windows: + - nokyc: + layout: even-vertical + panes: + - buyeur: + - cd ~/_storage/dev/nokyc/ + - while ./nokyc.py -f eur -t buy -d 5; do sleep 600; done + - buygbp: + - cd ~/nokyc + - while ./nokyc.py -f gbp -t buy -d 5; do sleep 600; done + - sellgbp: + - cd ~/nokyc/ + - while ./nokyc.py -f gbp -t sell -d 5; do sleep 600; done +" | tee ~/.config/tmuxinator/nokyc.yml +``` + +## Start +``` +bash +mux s nokyc +``` +## Exit window +``` +CTRL+B -> & , y +``` \ No newline at end of file