tmux list-windows -F "#{session_name}:#{window_index}:#{window_name}:#{window_active}"Format strings make tmux scripts much easier to automate.
tmux commands for listing state, using format strings, conditional logic, send-keys automation, and repeatable workspace bootstrapping.
Query tmux state and build scripts with format strings.
tmux list-windows -F "#{session_name}:#{window_index}:#{window_name}:#{window_active}"Format strings make tmux scripts much easier to automate.
tmux list-panes -a -F "#{session_name}:#{window_index}.#{pane_index} #{pane_current_path} #{pane_current_command}"Useful when scripting workspace reports or dashboards.
tmux display-message -p "#{client_termname} #{session_name} #{pane_id}"Great for shell scripts that need a few tmux facts.
tmux if-shell "test -f package.json" "display-message "node project""Lets tmux scripts adapt to the current project.
tmux run-shell "~/.tmux/scripts/session-bootstrap.sh"Useful for project bootstrapping and hooks.
Reusable patterns for bootstrapping projects.
tmux new-session -d -s api -n editorDetached creation is the foundation for repeatable startup scripts.
tmux send-keys -t api:editor "npm run dev" C-mUse `C-m` to send Enter after the command.
tmux select-window -t api:editorHelpful before attaching to a freshly bootstrapped session.
tmux attach-session -t apiCreates a polished project startup experience.