Preset Tmux Windows
To preset Tmux windows, following script can be used. It also issues ssh command to host which has same name as window name.
#!/bin/bash
WINDOWS="window_name1 window_name2 window_name3"
for each in $WINDOWS
do
if ! tmux has-session -t 0:$each; then
tmux new-window -n $each ssh $each
fi
done
tmux attach
References
Restore tmux session after reboot
Check If Window With a Specific Name Exists. If It Does Attach to it; Otherwise Create it and Run Command?