fmauch / catmux

A python package that wraps launching applications with a tmux script
MIT License
73 stars 11 forks source link

Error while creating session with window name being the same as session name #34

Closed nspielbau closed 7 months ago

nspielbau commented 10 months ago

When creating a session where the session and one window name are the same window creation will fail and the commands will be pushed to the next window.

Created session "test"
create window failed: index 0 in use
Error while calling "%s" ['tmux', '-L', 'catmux', 'new-window', '-t', 'test']

Example config:

---                                                                                            
common:                                                                                        
  # before_commands will be executed in each pane before doing anything else. Use this e.g. for
  #   - sourcing an environment                                                                
  #   - ssh-ing to another machine                                                             
  #before_commands:                                                                            
  # The default window will be the one displayed when first connecting to the tmux session     
  default_window: README                                                                       
# Everything will be opened in windows. Windows can have multiple splits.                      
windows:                                                                                       
  - name: test                                                                                 
    splits:                                                                                    
      - commands:                                                                              
        - echo "test"                                                                          
  - name: README                                                                               
    splits:                                                                                    
      - commands:                                                                              
        - echo "readme"                                                                        

image

fmauch commented 7 months ago

This should be fixed by #38