diff --git a/dotfiles/tmux.conf b/dotfiles/tmux.conf index 31a68d2f..dc6932e4 100644 --- a/dotfiles/tmux.conf +++ b/dotfiles/tmux.conf @@ -12,3 +12,8 @@ set-hook -g session-created 'run-shell " tmux rename-session -t \"#{session_name}\" \"$base\" fi "' + +# Create a new Codex session from the current pane path and switch to it. +# Prefix + C prompts for the session name (default: "-codex"). +bind-key C command-prompt -p "Codex session name:" -I "#{session_name}-codex" \ + "new-session -d -s '%%' -c '#{pane_current_path}' 'codex --dangerously-bypass-approvals-and-sandbox' \; switch-client -t '%%'"