I have a
~/.tmux/dev file which looks like this:
selectp -t 0 # select the first pane splitw -h -p 50 # split it into two halves selectp -t 1 # select the new, second (1) pane splitw -v -p 50 # split it into two halves selectp -t 0 # go back to the first pane send-keys 'vim .' Enter
If I run
tmux source-file ~/.tmux/dev from inside a tmux session, it works fine.
I want to create a bash script that opens tmux and automatically runs those commands.
I tried running
tmux new 'tmux source-file ~/.tmux/dev'
but I only see two panes; the pane with vim is missing.
I have read How do I get tmux to open up a set of panes without manually entering them?, but before installing a tool for managing tmux configs, I would like to grok what's happening here.
Thanks in advance for any light you can shed on the subject.