Files
dotfiles/dotfiles/tmux.conf

5 lines
365 B
Bash

# Automatically rename new sessions to the basename of the current directory
set-hook -g session-created 'run-shell "tmux rename-session -t #{session_name} $(basename #{pane_current_path})"'
# Also rename when attaching to a session (optional)
set-hook -g client-session-changed 'run-shell "tmux rename-session -t #{session_name} $(basename #{pane_current_path})"'