2020-11-01 15:57:10 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2020-05-08 17:15:22 +02:00
|
|
|
set -euf -o pipefail
|
|
|
|
|
|
|
|
VIM=${VIM:-"vim"}
|
|
|
|
TMUX=${TMUX:-"tmux"}
|
|
|
|
|
|
|
|
FILE=${FILE:-"$(date +%F).tidal"}
|
|
|
|
SESSION=${SESSION:-"tidal"}
|
|
|
|
|
|
|
|
TIDAL_BOOT_PATH=${TIDAL_BOOT_PATH:-""}
|
|
|
|
GHCI=${GHCI:-""}
|
|
|
|
|
2020-11-13 23:22:53 +01:00
|
|
|
args=${*:-$FILE}
|
2020-05-08 17:15:22 +02:00
|
|
|
|
|
|
|
# attach if session else create
|
2020-11-13 23:22:53 +01:00
|
|
|
$TMUX attach-session -t "$SESSION" || $TMUX new-session -s "$SESSION" \; \
|
|
|
|
split-window -h -t "$SESSION" \; \
|
2020-05-08 17:15:22 +02:00
|
|
|
send-keys -t 0 "$VIM $args" C-m \; \
|
|
|
|
send-keys -t 1 "TIDAL_BOOT_PATH=$TIDAL_BOOT_PATH GHCI=$GHCI tidal" C-m \; \
|
2020-11-13 23:22:53 +01:00
|
|
|
new-window -t "$SESSION":2 -n SuperDirt \; \
|
2020-05-14 00:38:59 +02:00
|
|
|
send-keys -t 0 "cadence-session-start -s && sclang ~/dev/live/tidal/superdirt_startup.scd" C-m \; \
|
2020-05-08 17:15:22 +02:00
|
|
|
select-window -t 1 \; \
|
2020-09-11 21:02:21 +02:00
|
|
|
resize-pane -t 1 -x 100 \; \
|
|
|
|
resize-pane -t 0 -x 125 \; \
|
2020-05-08 17:15:22 +02:00
|
|
|
select-pane -t 0
|