]> Sergey Matveev's repositories - mmc.git/blob - cmd/start
ade0962c693ce522ce8cfa460e157e67d54b0329
[mmc.git] / cmd / start
1 #!/bin/sh
2
3 cmd="$(dirname "$(realpath -- "$0")")"
4 unset TMUX
5 TMUX="tmux -S tmux.sock"
6 $TMUX has-session -t mmc 2>/dev/null && exit
7 rm -f debug
8 mkfifo debug
9 [ -s tmux.conf ] || sed "s#NEWWIN#$cmd/newwin#" < "$cmd"/tmux.conf > tmux.conf
10 $TMUX -f tmux.conf new-session -d -n ROOT -s mmc "cat debug | tai64n | tai64nlocal"
11 $TMUX split-window -h "$cmd/mmc/mmc -newwin $cmd/newwin -notify $cmd/notify | tai64n | tai64nlocal"
12 $TMUX attach-session