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

How to give focus to a particular pane/window #455

Closed
emayssat-ms opened this issue Sep 20, 2016 · 4 comments
Closed

How to give focus to a particular pane/window #455

emayssat-ms opened this issue Sep 20, 2016 · 4 comments

Comments

@emayssat-ms
Copy link

I can create tmux sessions with multiple multiple windows and multiple panes.
But how can I set the default windows to be the 2nd one, and the pane with focus on each windows to be the one I want (at 'tmuxinator start' of course).
I assume those are tmux commands, but could not find anything there related to focus.

Please help,

@emayssat-ms
Copy link
Author

emayssat-ms commented Sep 25, 2016

...

first:
  panes:
    first:
     - tmux select-window -t 2
     - tmux select-pane -t 1
     - clear

But that doesn't seem to work reliably...

@bbugyi200
Copy link

bbugyi200 commented Apr 20, 2018

To specify the startup window, you can use the startup_window option (check the README). I couldn't find a analagous option for selecting a startup pane on each window; however, I think you might want to adjust your workaround to use just tmux select-pane -t [W].[P], where W is the window number and P is the pane number of whichever pane you want to focus on window W. This seems to be working reliably for me to set startup panes on each window.

@rightaway
Copy link

Are maintainers interested in this feature? Something like focus: true under the pane object?

@ethagnawl
Copy link
Member

There's already an option to apply focus to one particular pane in the startup_window (which is either specified or set by default).

For instance:

project_name: focus
startup_window: 1
startup_pane: 1
...

This should be in the sample.yml in the README, so I will create an issue to track adding it.

I'm going to close this issue for now, but please feel free to re-open if anyone thinks there's anything else worth discussing.

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

4 participants