your princess is in another window

I've been playing with tmux for making it possible to do more things from one terminal window. Today I realized that you can type tmux commands in one shell, and affect the contents of other windows. You can send keypresses. I knew from the interactive help (C-b ?) that you can send a pane within a window to a new window, but you can also capture panes from one window in another. The command language is the same that you can type at the C-b : command prompt; you can put them in a file and process (from anywhere) with tmux source.

But the cuteness for now is that I can do

make continuous 2>&1 | tmux splitw -dI &
make serve 2>&1 | tmux splitw -dI &

and have two long-running processes putting their outputs into one window, while I can control them from another.

Update: I learned a nicer way.

Perhaps better is to put the splitting commands into the new window, so that I can access them from that page's history like I'm accustomed to:

tmux new-window -d -t nikola:9
tmux send-keys -t nikola:9.0 "tmux splitw -t nikola:9.0 make continuous" Enter
tmux send-keys -t nikola:9.0 "tmux splitw -t nikola:9.0 make serve" Enter

Now I should have output scrolling in two panes, which I can kill with C-c as usual, but the commands to recreate them are at the top of the command history in the third pane there. I want to at set -g remain-on-exit failed to the .tmux.conf so that I can debug them if there are problems.