Skip to content

feat: enable tmux focus-events for focus tracking#2

Merged
jsifalda merged 1 commit into
masterfrom
feat/tmux-focus-events
Jun 5, 2026
Merged

feat: enable tmux focus-events for focus tracking#2
jsifalda merged 1 commit into
masterfrom
feat/tmux-focus-events

Conversation

@craftengineer

@craftengineer craftengineer commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add set -g focus-events on to tmux/tmux.conf so tmux forwards terminal focus-in/out events to programs running in panes.
  • Fixes the tmux focus-events off warning shown by Claude Code; also benefits vim/neovim focus tracking. Purely additive and reversible.

Test plan

  • tmux source-file ~/.tmux.conf then tmux show-options -g focus-events reports focus-events on
  • The focus-events off warning no longer appears in a Claude Code pane inside tmux

Summary by CodeRabbit

  • Chores
    • Enhanced tmux configuration to enable focus event reporting.

- Add 'set -g focus-events on' so tmux forwards focus-in/out events to
  programs in panes (Claude Code, vim/neovim), fixing the
  'focus-events off' warning.
Copilot AI review requested due to automatic review settings June 5, 2026 20:29
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown

Complex PR? Review this PR in Change Stack to move by importance, not file order.

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: dabca1c2-318f-4ff8-8f8c-f24414763485

📥 Commits

Reviewing files that changed from the base of the PR and between 44059fa and c012641.

📒 Files selected for processing (1)
  • tmux/tmux.conf

📝 Walkthrough

Walkthrough

Enables tmux focus event reporting by adding set -g focus-events on to the configuration file, allowing tmux to report window focus events to applications running inside tmux.

Changes

Tmux Focus Events

Layer / File(s) Summary
Enable focus events
tmux/tmux.conf
Adds set -g focus-events on configuration setting to enable tmux focus event reporting.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~1 minute

Poem

🐰 A single line, so clean and bright,
Focus events now burning light,
Tmux sees when windows come to play,
One small setting makes the day! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: enabling tmux focus-events for focus tracking, which matches the single line addition to tmux.conf.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/tmux-focus-events

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables tmux focus event forwarding so applications inside panes can detect terminal focus-in/out, addressing the focus-events off warning (e.g., from Claude Code) and improving editor focus tracking.

Changes:

  • Add set -g focus-events on to the tmux global configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jsifalda jsifalda merged commit 7bc66e9 into master Jun 5, 2026
2 checks passed
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.

3 participants