-
Notifications
You must be signed in to change notification settings - Fork 626
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 write tmux commands in confg #259
Comments
I'm also interested in how to add tmux-commands to the config. Ideally I'd like to be able to open a pane with an ssh-login to a remote system without first starting my $SHELL in that pane and then issuing the command. |
@nadeemkhedr Commands are issued to panes and windows via
The valid keys that can be used are specified in the tmux man pages under "Key Bindings". @jby I don't think tmux can be run without a shell. You can definitely issue ssh commands to connect to a remote server via |
I solved it by running tmuxinator debug on my session and then editing the output and creating a script from that: #!/usr/local/bin/zsh
# Clear rbenv variables before starting tmux
unset RBENV_VERSION
unset RBENV_DIR
tmux -L jby start-server\; has-session -t jby 2>/dev/null
if [ "$?" -eq 1 ]; then
cd /Users/jby
# Run pre command.
kinit jby
# Create the session and the first window.
TMUX= tmux -L jby new-session -d -s jby -n localhost
# Create other windows.
tmux -L jby new-window -c /Users/jby -t jby:2 -n host1 "ssh host1"
tmux -L jby new-window -c /Users/jby -t jby:3 -n host2 "ssh host2"
tmux -L jby new-window -c /Users/jby -t jby:4 -n host3 "ssh host3"
tmux -L jby new-window -c /Users/jby -t jby:5 -n host4 "ssh host4"
tmux -L jby new-window -c /Users/jby -t jby:6 -n host5 "ssh host5"
tmux -L jby new-window -c /Users/jby -t jby:7 -n host6 "ssh host6"
tmux -L jby new-window -c /Users/jby -t jby:8 -n host7 "ssh host7"
tmux -L jby splitw -h -t jby:8 "ssh host7"
tmux -L jby new-window -c /Users/jby -t jby:9 -n host8 "ssh host8"
tmux -L jby splitw -h -t jby:9 "ssh host8"
tmux -L jby new-window -c /Users/jby -t jby:10 -n host9 "ssh host9"
tmux -L jby splitw -h -t jby:10 "ssh host9"
tmux -L jby new-window -c /Users/jby -t jby:11 -n host10 "ssh host10"
tmux -L jby splitw -h -t jby:11 "ssh host10"
tmux -L jby new-window -c /Users/jby -t jby:12 -n host11 "ssh host11"
tmux -L jby select-window -t jby:1
fi
if [ -z "$TMUX" ]; then
tmux -L jby -u attach-session -t jby
else
tmux -L jby -u switch-client -t jby
fi |
I'm having trouble with something probably similar to this. What I need is a pane that will have the clock on it. I tried |
what i want is to start a tmux session using tmuxinator and the vim pane would be zoomed in (prefex + z) but how can I specify that in tmuxinator ?
The text was updated successfully, but these errors were encountered: