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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Execute Additional TMUX commands after init.

deanchen opened this issue · comments

Is it possible to run a TMUX command after a window has been created?

The width for the main vertical layout is narrow on large screens so I would like to widen it. Specifically I'd like to run resize-pane -t 0 -x 200 after the window and layout are initialized.

Have you tried to specify this exact command as one of your panes command?

windows:
  - name: sample-three-panes
    root: ~/Code/sample/www
    layout: main-vertical
    panes:
      - commands:
        - vim
      - commands:
        - git pull
        - git status
      - commands:
        - rails server
        - tmux resize-pane -t 0 -x 200

In my environment, it is working to put tmux resize-pane -t 0 -x 200 in first line instead of last line.

 windows:                                   
   - name: three-panes                      
     root: ~/workspace                      
     layout: main-vertical                  
     panes:                                 
       - commands:                          
         - tmux resize-pane -t 1 -x 120     
         - vim                              
       - commands:                          
         - top                              
       - commands:
         - ls -l

Since there has been no activity in this issue for a long time, I’m going to close it. Thanks!