# Tmux Session & Window Naming
## Rule
All tmux sessions and windows MUST have descriptive names. Never use default numeric names.
## Session Naming
```bash
# Good: descriptive project/purpose names
tmux new -s myproject
tmux new -s devops
tmux new -s monitoring
tmux new -s notes
# Bad: default or meaningless names
tmux new # Creates "0"
tmux new -s a # Not descriptive
tmux new -s test # Too vague
```
## Window Naming
```bash
# Good: purpose-driven names
tmux rename-window editor
tmux rename-window server
tmux rename-window database
tmux rename-window logs
tmux rename-window git
# Bad: default names
# Window names like "0:bash" or "1:zsh"
```
## Auto-Rename Policy
```bash
# Option 1: Disable auto-rename (keep manual names)
set -g allow-rename off
setw -g automatic-rename off
# Option 2: Auto-rename based on running command (useful for some)
setw -g automatic-rename on
set -g automatic-rename-format '#{b:pane_current_path}'
```
## Naming Patterns
| Session | Windows |
|---------|---------|
| `webapp` | editor, frontend, backend, db, logs |
| `devops` | terraform, k8s, monitoring, docs |
| `personal` | notes, dotfiles, scratch |
## Script Integration
```bash
# Always name in automation scripts
tmux new-session -d -s "$PROJECT_NAME" -n editor
tmux new-window -t "$PROJECT_NAME" -n server
tmux new-window -t "$PROJECT_NAME" -n git
```
## Good
```bash
tmux new -s webapp -n editor
# Session: webapp, Window: editor — instantly identifiable
```
## Bad
```bash
tmux new
# Session: 0, Window: 0:bash — meaningless
```