2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-08-03 16:06:59 +00:00

Merge pull request #7669 from xcat2/backport-7639-to-2.18

[Backport 2.18] fix(tcons): make tcons work with modern tmux
This commit is contained in:
xcat2-backport-automation[bot]
2026-07-23 23:48:44 +00:00
committed by GitHub
+6 -5
View File
@@ -5,14 +5,15 @@ for i in `nodels "$1"`; do
if [ "$f" = 1 ]; then
f=0
qdate=$((`date +%s`+5))
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"
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 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.$$
tmux attach -t tcons_$$