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