teamocil icon indicating copy to clipboard operation
teamocil copied to clipboard

Create tmux session instead of editing existing one

Open dangbert opened this issue 2 years ago • 1 comments

It seems like teamocil defaults to editing an existing tmux session (not sure how it picks which one either).

Is there a way to have it create a new tmux session instead first? As a workaround I'm doing: tmux new -d -s tmpsess && teamocil --layout layout.yml

Here's my example layout.yml:

name: mysess
windows:
  - name: tasks
    root: ~
    layout: tiled
    panes:
      - ./experiment.py -h
      - date && ./experiment.py -h

dangbert avatar Jan 26 '23 21:01 dangbert

You are right, this is not supported yet. Teamocil starts by renaming the current session: https://github.com/remi/teamocil/blob/master/lib/teamocil/tmux/session.rb#L20

This is something we could support (either renaming or creating a new session).

Do you have the time to send a pull request for this feature? I could help you with naming, implementation and stuff 🙂

remi avatar Jan 30 '23 13:01 remi