From e1fc1437cd637a66f3dad065b7797c3f0b9de2d9 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 7 May 2012 18:59:30 +0000 Subject: [PATCH] New command 'tcons' to be like 'wcons' but using tmux instead of x windows git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@12556 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/tcons | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 xCAT-client/bin/tcons diff --git a/xCAT-client/bin/tcons b/xCAT-client/bin/tcons new file mode 100755 index 000000000..c7f5ea4fb --- /dev/null +++ b/xCAT-client/bin/tcons @@ -0,0 +1,18 @@ +#!/bin/sh +f=1 +p=0 +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" + continue + fi + tmux select-pane -t $p + 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 +done +tmux select-pane -t 0 +tmux attach -t tcons.$$