Tmux Application Startup Script
My development environment depends on several processes running. Here’s how I’ve scripted this setup. Whenever I boot up, I need at least these processes running: Sidekiq (jobs) Rails (API) Webpack (frontend) Docker (containers) Here’s how I’ve scripted it: #!/bin/bash tmux new-window -n sidekiq tmux send-keys -t sidekiq 'sidekiq' Enter tmux new-window -n rails tmux send-keys -t rails 'rails s' Enter tmux new-window -n webpack tmux send-keys -t webpack 'bin/webpack' Enter tmux new-window -n docker tmux send-keys -t docker 'bin/docker' Enter open http://host.docker.internal:3000/ This starts each process in its own named Tmux window, then opens the application in my browser. That last step is a losing race condition with the other processes, which are still booting, but I just wait a few seconds and refresh the browser tab. ...