I do something similar, splitting one window into four panes and running the
same watch-like command (in my case, watchc is a zsh alias) in each. Here
are the pertinent .tmux.conf lines I use:
# Keep windows open after running the command
set set-remain-on-exit on
# create new session with new window
new -d -n localhost
new-window -d -n localhost
new-window -d -n h1 'ssh hoarder01'
new-window -d -n h2 'ssh hoarder02'
[snip]
# Set up watchers
new-window -n WATCHERS 'ssh odlaw'
split-window 'ssh flambe'
split-window 'ssh spirit'
split-window 'ssh fire'
select-layout tiled
send-keys -t 0 "watchc" C-m
send-keys -t 1 "watchc" C-m
send-keys -t 2 "watchc" C-m
send-keys -t 3 "watchc" C-m
# Revert remain-on-exit to global value for future windows
set -u set-remain-on-exit
---
All ears if there's a better way to accomplish the same,
Jsohua
On Wed, Apr 13, 2011 at 3:14 PM, Rita <rmorgan...@gmail.com> wrote:
> I have 3 commands,
> command1 #writes something to stdout and exit
> command2 #writes something to stdout and exit
> command3 #similar to tail -f its keep updating
>
> I typically, do
>
> ssh serverA
> watch -n 5 command1
> split window
>
> ssh serverA
> watch -n 5 command2
>
> split window
> ssh serverA
> command3
>
>
> I would like to bind all this to '>' . What is the proper way to do such a
> command sequence?
>
>
>
>
>
> --
> --- Get your facts first, then you can distort them as you please.--
>
>
> ------------------------------------------------------------------------------
> Benefiting from Server Virtualization: Beyond Initial Workload
> Consolidation -- Increasing the use of server virtualization is a top
> priority.Virtualization can reduce costs, simplify management, and improve
> application availability and disaster protection. Learn more about boosting
> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
> _______________________________________________
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users
>
>
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users