commandtmuxtmuxinator

Send tmux command to tmuxinator


Specifically, I need to create a profile that by default will have a small pain displaying the clock, which can be triggered with C-b t. However, I couldn't find the way to do that.

In this GitHub issue comment, a Collaborator of the project said it could be defined like a regular command, but on my ZSH setup, it just didn't work, saying "zsh: Command not found: C-b".

Does anyone happen to know how I can achieve this?

Thanks!!!


Solution

  • windows:
      - work:
          panes:
            - tmux clock-mode
            - ipython
    

    Below is what happens when typing tmux clock-mode inside tmux session:

    1. current tmux client connect to tmux server
    2. attach to current(or the most recently) session
    3. since the -t argument is omitted, the currently active pane in the current window is used for the clock-mode command.

    Checkout the session in $man tmux for more detail.

    COMMANDS
         This section contains a list of the commands supported by tmux.  Most commands accept the optional -t argument with one of target-client, target-session
         target-window, or target-pane.  These specify the client, session, window or pane which a command should affect.  target-client is the name of the pty(7)
         file to which the client is connected, for example either of /dev/ttyp1 or ttyp1 for the client attached to /dev/ttyp1.  If no client is specified, the
         current client is chosen, if possible, or an error is reported.  Clients may be listed with the list-clients command.