Skip to content

feat(terminal): align tmux + claude with code.claude.com recommendations#18

Merged
chagui merged 2 commits into
mainfrom
chagui/terminal/claude-code-recommendations
Apr 25, 2026
Merged

feat(terminal): align tmux + claude with code.claude.com recommendations#18
chagui merged 2 commits into
mainfrom
chagui/terminal/claude-code-recommendations

Conversation

@chagui
Copy link
Copy Markdown
Owner

@chagui chagui commented Apr 25, 2026

Summary

Audited the dotfiles against code.claude.com/docs/en/terminal-config. Two gaps, both addressed here:

  • tmux was missing the three lines Claude Code needs to behave correctly when run inside tmux (the primary path here, since Alacritty auto-launches tmux and Ghostty is also typically used with tmux). Without them, Shift+Enter submits instead of inserting a newline, and desktop notifications + the progress bar get swallowed by tmux before reaching Ghostty.
  • dot_claude/settings.json had no Notification hook. Ghostty already forwards Claude Code's desktop notification, but adding an audible cue (Glass.aiff) makes it harder to miss when the terminal is not in focus.

Ghostty's macos-option-as-alt = left and native Shift+Enter were already correct, so no changes there.

Out of scope

  • Alacritty Shift+Enter binding via /terminal-setup: redundant — Alacritty here always launches tmux, so the tmux fix covers it.
  • Fullscreen mode, Vim editor mode, custom themes: personal-preference toggles, not "recommendations" per the docs.

Test plan

  • chezmoi diff shows only the additions in this PR
  • After chezmoi apply + tmux source-file ~/.config/tmux/tmux.conf:
    • Inside tmux, claude prompt: Shift+Enter inserts a newline (does not submit)
    • When Claude finishes a task or asks for a permission prompt, Ghostty shows a desktop notification AND Glass.aiff plays
  • tmux show-options -g allow-passthrough returns on
  • tmux show-options -s extended-keys returns on

🤖 Generated with Claude Code

chagui and others added 2 commits April 25, 2026 20:39
Without these, Claude Code running inside tmux loses Shift+Enter (tmux
can't distinguish it from plain Enter) and its desktop notifications +
progress bar get swallowed before reaching Ghostty/iTerm2/Kitty.

https://code.claude.com/docs/en/terminal-config#configure-tmux

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Ghostty already forwards Claude Code's desktop notification, but a
Notification hook adds an audible cue that fires alongside it — useful
when the terminal is not in focus.

https://code.claude.com/docs/en/terminal-config#play-a-sound-with-a-notification-hook

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@chagui chagui merged commit fedace6 into main Apr 25, 2026
1 check passed
@chagui chagui deleted the chagui/terminal/claude-code-recommendations branch April 25, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant