dots/.bin/tidalcycles

24 lines
659 B
Plaintext
Raw Normal View History

2020-05-08 17:15:22 +02:00
#!/bin/bash
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:-""}
args=${@:-$FILE}
# attach if session else create
$TMUX attach-session -t $SESSION || $TMUX new-session -s $SESSION \; \
split-window -h -t $SESSION \; \
send-keys -t 0 "$VIM $args" C-m \; \
send-keys -t 1 "TIDAL_BOOT_PATH=$TIDAL_BOOT_PATH GHCI=$GHCI tidal" C-m \; \
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 \; \
select-pane -t 0