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.35k stars 101 forks source link

teamocil renames the session #77

Closed artm closed 10 years ago

artm commented 10 years ago

The session names that teamocil creates are useless. Session name should either be left as is or set to the name of the loaded layout.

remi commented 10 years ago

For the moment, you can specify the layout name with the name key in your layout:

name: my-session-name
windows:
  - name: foo
    root: ~
    layout: tiled
    panes:
      - pwd
      - pwd
artm commented 10 years ago

thanks, I've eventually figured that out by digging through the sources. But what is the rationale behind renaming the sessions in the first place?

I use a different helper script to "join session or create if no such session exists", so by the time I run teamocil my session is named correctly already. I'd like to lower the number of hups I have to go through now, but still haven't got all the right intuitions in place yet :-)

remi commented 10 years ago

thanks, I've eventually figured that out by digging through the sources. But what is the rationale behind renaming the sessions in the first place?

Honestly, I thought about that when looking in the source code myself a few minutes ago :smile: I think I’m going to change the default behavior so it doesn’t try to do anything if we don’t specify an explicit session name. I think that would be the most logical thing to do. What do you think?

petrikoz commented 10 years ago

May be will add info about key name wich rename session in ReadMe?

remi commented 10 years ago

@petrikoz Yes I will add it soon!

thewatts commented 9 years ago

To clarify - is it supposed to no longer rename the session? Or is that still a work in progress?

When using - I already have my session name, but it gets renamed when launching.

Or perhaps is there a way to run a command through the name key?

Ex:

name: `tmux list-panes -F '#{session_name}'`