Hi Thomas,
thanks for your reply.
My problem is i don't know how to specify an id when automatically creating
my pane since i use a command send-keys to create my new pane.
Indeed, i did not find a new-pane command (similar to new-window).
Thanks,
Alex
2012/12/27 Thomas Adam <tho...@xteddy.org>
> Hi,
>
> Look at the FORMATS section in the tmux man page, there's a variable for
> the count of panes per window.
> On Dec 27, 2012 8:12 AM, "El Spliffo" <el.spli...@laposte.net> wrote:
>
>> Hi everybody,
>>
>> i made a script to open automatically my SSH sessions in a few
>> windows/panes, here it is :
>> ----------------------------------------
>> #!/bin/sh
>> tmux new-session -d -s hawkhost
>>
>> tmux new-window -t hawkhost:1 -n 'VPN' 'ssh ovpn@10.10.1.70'
>> tmux new-window -t hawkhost:2 -n 'Halo' 'ssh root@10.10.1.27'
>> tmux new-window -t hawkhost:3 -n 'Backup-Halo' 'ssh infra@10.10.1.73'
>> tmux new-window -t hawkhost:4 -n 'Bdd' 'ssh ht@10.10.1.19'
>> tmux new-window -t hawkhost:5 -n 'DNS' 'ssh -p 2222 ht@10.10.1.79'
>> tmux new-window -t hawkhost:6 -n 'Ar' 'ssh root@10.10.1.2'
>> tmux new-window -t hawkhost:7 -n 'Srvdmz' 'ssh root@10.1.0.10'
>> tmux split-window -h -t hawkhost:6 'ssh root@192.168.1.3'
>> tmux send-keys -t hawkhost:6.0 '/root/script.sh' C-m
>> tmux send-keys -t hawkhost:6.1 '/root/script.sh' C-m
>> tmux select-window -t hawkhost:0
>> tmux -2 attach-session -t hawkhost
>> ----------------------------------------
>> This script is very handy and it allows me to retrieve all my sessions
>> histories as soon as the tmux process on the server does not end.
>>
>> My only problem is that the split-window command re-splits my already
>> split panes, this is not done by the new-window command. Is it possible to
>> avoid this (if a pane is already split, do not split it on more time, maybe
>> this should require an id) ?
>>
>> Thanks very much for any help !
>> Alex
>>
>>
>> ------------------------------------------------------------------------------
>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
>> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
>> MVPs and experts. ON SALE this month only -- learn more at:
>> http://p.sf.net/sfu/learnmore_122712
>> _______________________________________________
>> tmux-users mailing list
>> tmux-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/tmux-users
>>
>>
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users