Last active
April 30, 2020 07:11
-
-
Save hartmut27/a1932efaf73453b3cf9d0061f441deea to your computer and use it in GitHub Desktop.
One-click Quadruple Monitoring Startup Script (tmux automate): Jest watch, Alcotest watch, Backend HTTP-Server watch, Frontend HTTP-Server watch
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 | |
tmux new-session -s 'S1' \; \ | |
attach -t 'S1' \; \ | |
set -g pane-border-status top \; \ | |
set -g base-index 1 \; \ | |
set -g pane-base-index 1 \; \ | |
rename-window -t 0 'W0' \; \ | |
\ | |
select-pane -T "Jest watch" \; \ | |
send-keys 'npm run watch:test' C-m \; \ | |
\ | |
split-window -v -p 34 \; \ | |
select-pane -T "Backend HTTP-Server" \; \ | |
send-keys 'esy build dune exec backend/App.exe' C-m \; \ | |
\ | |
split-window -h -p 55 \; \ | |
select-pane -T "Frontend HTTP-Server" \; \ | |
send-keys 'npm run server' C-m \; \ | |
\ | |
select-pane -t 1 \; \ | |
split-window -h -p 45 \; \ | |
select-pane -T "Alcotest watch" \; \ | |
send-keys 'esy watch:test' C-m \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if you move the script above in to a separate
.tmux
config file, you can ommit the semicolons and newlines at each end of line (thx to @the_spyder!).