1

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!!!

1 Answer 1

2
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.
Sign up to request clarification or add additional context in comments.

4 Comments

Could you please explain a little bit how this solves the problem?
This is weird when I saw the command on one pane, and the clock displays on another pane. Screenshot
@NgocPham you should explicitly specify your target pane with tmux clock-mode -t target-pane as there is no guarantee for the active pane at the bootstrap progress. For the reason that the clock shows up on the first pane in your screenshot, please read github.com/tmuxinator/tmuxinator/issues/52
Awesome! It works perfectly now. All I need is tmux clock-mode -t session-name:window-name:top-right. Thank you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.