Skip to content

Instantly share code, notes, and snippets.

@jreypo
Created September 25, 2025 14:14
Show Gist options
  • Select an option

  • Save jreypo/b53f5e335ea24cc31fd0d2dc68573d8a to your computer and use it in GitHub Desktop.

Select an option

Save jreypo/b53f5e335ea24cc31fd0d2dc68573d8a to your computer and use it in GitHub Desktop.
tmux startup script
#!/usr/bin/env bash
SESSION=dev
# If session already exists, just attach
if tmux has-session -t $SESSION 2>/dev/null; then
tmux attach -t $SESSION
exit 0
fi
# Otherwise create new one
tmux new-session -d -s $SESSION -n main
tmux new-window -t $SESSION:1 -n devlab
tmux new-window -t $SESSION:2 -n blog
tmux attach -t $SESSION:0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment