2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-11-02 12:22:36 +00:00

Direct tmux commands in tcons

This fixes tcons interacting with incorrect
tmux session.
This commit is contained in:
Jarrod Johnson
2020-03-27 11:00:39 -04:00
parent a5538bdb8b
commit 6c72a27077

View File

@@ -8,12 +8,12 @@ for i in `nodels "$1"`; do
tmux new-session -d -s tcons_$$ -x 800 -y 800 "rcons $i;if [ \`date +%s\` -lt $qdate ]; then echo Press enter to close; read qdate; fi"
continue
fi
tmux select-pane -t $p
tmux set-option pane-border-status top > /dev/null 2>&1 | cat > /dev/null
tmux select-pane -t tcons.$$
tmux set-option -t tcons.$$:$p pane-border-status top > /dev/null 2>&1 | cat > /dev/null
p=$((p+1))
qdate=$((`date +%s`+5))
tmux split -h "rcons $i;if [ \`date +%s\` -lt $qdate ]; then echo Press enter to close; read qdate; fi"
tmux select-layout tiled
tmux split -h -t tcons.$$ "rcons $i;if [ \`date +%s\` -lt $qdate ]; then echo Press enter to close; read qdate; fi"
tmux select-layout -t tcons.$$ tiled
done
tmux select-pane -t 0
tmux attach -t tcons_$$