remi / teamocil

There's no I in Teamocil. At least not where you think. Teamocil is a simple tool used to automatically create windows and panes in tmux with YAML files.
MIT License
2.36k stars 101 forks source link

Limit of panes ? #87

Closed Taluu closed 9 years ago

Taluu commented 9 years ago

Hi,

I have a tmux session configured with teamocil, with a window arranged in a tiled layout. So far so good. If I have 5 panes, all of them are opened (and rightly arranged), but when there is a 6th pane, it seems it is never opened..

Here is the output of the `--debug`` command :

 talus@zoidberg $ teamocil --debug layout_name
tmux rename-session 'Layout'
tmux new-window -n 'CLIs' -c '~/dev/'
tmux send-keys -t 0 'cd foo'
tmux send-keys -t 0 'Enter'
tmux split-window -c '~/dev/'
tmux send-keys -t 1 'tail -f /var/log/some.log'
tmux send-keys -t 1 'Enter'
tmux split-window -c '~/dev'
tmux send-keys -t 2 'cd bar'
tmux send-keys -t 2 'Enter'
tmux split-window -c '~/dev'
tmux send-keys -t 3 'cd baz'
tmux send-keys -t 3 'Enter'
tmux select-layout '79f4,213x57,0,0[213x40,0,0{133x40,0,0,0,79x40,134,0,1},213x16,0,41{107x16,0,41,2,105x16,108,41,3}]'
tmux select-pane -t 0
tmux new-window -n 'Logs'
tmux send-keys -t 0 'tail -f /var/log/more.log'
tmux send-keys -t 0 'Enter'
tmux split-window
tmux send-keys -t 1 'tail -f /var/log/error.log'
tmux send-keys -t 1 'Enter'
tmux select-layout 'tiled'
tmux select-pane -t 0
tmux new-window -n 'Tools' -c '~/dev'
tmux send-keys -t 0 'redis-cli'
tmux send-keys -t 0 'Enter'
tmux split-window -c '~/dev'
tmux send-keys -t 1 'mysql -u root'
tmux send-keys -t 1 'Enter'
tmux select-layout 'tiled'
tmux select-pane -t 0
tmux new-window -n 'Fubar' -c '~/dev'
tmux send-keys -t 0 'pwd'
tmux send-keys -t 0 'Enter'
tmux split-window -c '~/dev'
tmux send-keys -t 1 'pwd'
tmux send-keys -t 1 'Enter'
tmux split-window -c '~/dev'
tmux send-keys -t 2 'pwd'
tmux send-keys -t 2 'Enter'
tmux split-window -c '~/dev'
tmux send-keys -t 3 'pwd'
tmux send-keys -t 3 'Enter'
tmux split-window -c '~/dev'
tmux send-keys -t 4 'pwd'
tmux send-keys -t 4 'Enter'
tmux split-window -c '~/dev'
tmux send-keys -t 5 'pwd'
tmux send-keys -t 5 'Enter'
tmux select-layout 'tiled'
tmux select-pane -t 0
tmux select-window -t 4

When I split manually the last window, and add the last (6th) pane, and call again the select-layout, the pane is opened and everything looks fine. But when opening with tmux, the 6th layout is never built (layout 5 in the provided example)

Taluu commented 9 years ago

More news, I don't know if it is relevant, but It seems I have a pane too small error :

create pane failed: pane too small
session not found: 5
session not found: 5
arranging in: tiled

I think it could be the same error as tmuxinator/tmuxinator#48

bubenkoff commented 9 years ago

+1 for solving this the same for me

remi commented 9 years ago

You’re right, a quick fix would be to send the layout command after creating each individual pane. I’m on it :smile:

remi commented 9 years ago

@Taluu @bubenkoff I think I’ve fixed it in the fix/select-layout-after-each-pane branch. Would you mind taking a look (by running ./bin/teamocil layout_name) and tell me if it solves the problem for you?

Thanks!

bubenkoff commented 9 years ago

master:

└─[127] <git:(master d0875ae) > ruby2.0 bin/teamocil services 
create pane failed: pane too small
session not found: 5
session not found: 5
create pane failed: pane too small
session not found: 6
session not found: 6
arranging in: tiled

fix/select-layout-after-each-pane

└─[0] <git:(fix/select-layout-after-each-pane 891f720) > ruby2.0 bin/teamocil services                  
arranging in: tiled
arranging in: tiled
arranging in: tiled
arranging in: tiled
arranging in: tiled
arranging in: tiled
arranging in: tiled

and it works!

Taluu commented 9 years ago

It seems I have the same result as @bubenkoff, so this should do fine. Maybe try to cleanout the output once the panes are all created would be a great addition ?

pwd
pwd
arranging in: tiled
arranging in: tiled
arranging in: tiled
arranging in: tiled
arranging in: tiled
arranging in: tiled
arranging in: tiled
arranging in: tiled
arranging in: tiled
arranging in: tiled
arranging in: tiled
arranging in: tiled
arranging in: tiled
arranging in: tiled
arranging in: tiled

$
bubenkoff commented 9 years ago

@remiprev any chance to get it merged/released?

remi commented 9 years ago

I’ve merged this and released Teamocil 1.2. Thank you for your help guys!

bubenkoff commented 9 years ago

thank You!

On 16/03/2015, Rémi Prévost notifications@github.com wrote:

I’ve merged this and released Teamocil 1.2. Thank you for your help guys!


Reply to this email directly or view it on GitHub: https://github.com/remiprev/teamocil/issues/87#issuecomment-81573100

Anatoly Bubenkov