Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide an option to specify a window specific startup pane #822

Open
Shamaoke opened this issue May 26, 2021 · 2 comments
Open

Provide an option to specify a window specific startup pane #822

Shamaoke opened this issue May 26, 2021 · 2 comments

Comments

@Shamaoke
Copy link

I'd like to be able to select a specific startup pane per window.

Here's a sample project where it can be useful.

name: sample

windows:
  - git:
      layout: main-vertical
      panes:
        - watch -ctn 1 'git log --graph --oneline --decorate=short --all'
        - watch -ctn 1 'git branch && git status -s'
        - clear

The project has three panes arranged in the main-vertical layout. The first (main) pane displays the git log which is updated dynamically. The second pane displays the staged area which is also updated dynamically. The third pane is supposed to enter the commands specific to git (e. g. add, commit, etc.). That is, the window itself is an area where you work with git.

When the window is loaded, the cursor is always on the first pane, where the git log is displayed. So, you are forced to move the cursor to the third pane every time you start the project, since this pane is a place where you do the work in this window (two other windows just display the information).

I propose to add a window specific startup pane to address this issue.

Here's an example of how it may look like in a project file.

name: sample

windows:
  - git:
      layout: main-vertical
      startup_pane: 3
      panes:
        - watch -ctn 1 'git log --graph --oneline --decorate=short --all'
        - watch -ctn 1 'git branch && git status -s'
        - clear
@ethagnawl
Copy link
Member

You should be able to use startup_pane at the top level of the project config file.

For example:

# /home/bloop/.config/tmuxinator/hello-tmuxinator.yml
name: hello-tmuxinator
startup_window: 1
startup_pane: 1
windows:
  - server:
    - vim config/routes.rb
  - client:
      layout: main-vertical
      panes:
        - echo one
        - echo two # selected

@Shamaoke
Copy link
Author

I understand that, but I need an ability to configure a startup pane for each window separately, regardless of a startup window.

Here's an example.

name: sample

startup_window: 1

windows:
  - first:
      layout: even-horizontal
      startup_pane: 1
      panes:
        - vim # <- selected
        -
  - second:
      layout: even-horizontal
      startup_pane: 2
      panes:
        -
        - vim # <- selected
  - third:
      layout: main-vertical
      startup_pane: 3
      panes:
        - watch -ctn 1 'git log --graph --oneline --decorate=short --all'
        - watch -ctn 1 'git branch && git status -s'
        - clear # <- selected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants