Do you have a standard workflow that involves setting up a specific tmux layout, or running certain commands? By writing tmux scripts, you can automate your tedious daily setup, while simultaneously documenting it for yourself. We'll cover the tmux command equivalents of common key bindings and write some simple, useful scripts.
# Set some configuration optionsSESSION=$USER# Create a new, detached sessiontmux new-session -d -s $SESSION# Create a second windowtmux new-window -t $SESSION:1 -n 'webserver'# Select and configure the first windowtmux select-window -t $SESSION:1tmux split-window -v tmux send-keys 'cd examples/react; python -m SimpleHTTPServer' C-m# Attach to the sessiontmux attach-session -t $SESSION