Reputation: 43427
I want to create a tmux keybind which sends a set of keystrokes to the marked pane. This is convenient for implementing a hotkey that runs something so I don't have to manually focus another pane and then come back.
But I'd like for this key to not do anything if there's no marked pane present. I've looked in the manpage and found nothing obvious that I can use to check this state.
Upvotes: 1
Views: 698
Reputation: 1678
To target the marked pane you can use -t '~'
or -t '{marked}'
.
In this case it is simply a matter of send -t '~' <keys here>
.
A more generic way to get the marked pane in your shell would be tmux display -p -t '~' '#D'
.
Upvotes: 3