3 cmd="$(dirname "$(realpath -- "$0")")"
5 TMUX="tmux -S tmux.sock"
6 $TMUX has-session -t mmc 2>/dev/null && exit
8 rm -f debug users/status
9 mkfifo debug users/status
10 [ -s tmux.conf ] || sed "s#NEWWIN#$cmd/newwin#" < "$cmd"/tmux.conf > tmux.conf
11 $TMUX -f tmux.conf new-session -d -n ROOT -s mmc "cat debug | tai64n | tai64nlocal"
12 $TMUX split-window -h 'while : ; do cat users/status | spc -e grn,"^O:.*" -e cya,"^A:.*" ; sleep 5 ; clear ; done'
13 $TMUX split-window -v "$cmd/mmc/mmc -debug debug -user-status users/status -newwin $cmd/newwin -notify $cmd/notify | tai64n | tai64nlocal"