Skip to content

feat(tmux): configurable tmux prefix + swapped chord defaults - #34

Merged
jongracecox merged 1 commit into
mainfrom
worktree/20260520-fujimoto-meta-key
May 20, 2026
Merged

feat(tmux): configurable tmux prefix + swapped chord defaults#34
jongracecox merged 1 commit into
mainfrom
worktree/20260520-fujimoto-meta-key

Conversation

@jongracecox

Copy link
Copy Markdown
Owner

Summary

  • New FUJIMOTO_TMUX_PREFIX env var (default C-b) configures the tmux prefix per session.
  • Breaking: FUJIMOTO_META_KEY default swapped from C-f to C-a. Restore the old layout with FUJIMOTO_META_KEY=C-f FUJIMOTO_TMUX_PREFIX=C-a.
  • Fujimoto raises TmuxError if the two keys collide.
  • Fujimoto key table gains d (detach), x (confirm-before kill-pane), and [ (copy-mode) so moving the prefix off C-a doesn't cost users their three common prefix bindings.
  • README and CLAUDE.md updated with new defaults, migration snippet, and the expanded shortcut table.

Motivation

The previous defaults put the tmux prefix on Ctrl-A and the fujimoto chord on Ctrl-F. Muscle-memory drift meant Ctrl-A t kept firing tmux's clock instead of the fujimoto terminal split. Swapping the defaults puts the chord on the more ergonomic key and parks tmux's prefix on its standard C-b. The keys are environment-configurable for anyone who prefers the old layout.

Release notes

Call out the swapped defaults as a breaking change in the next GitHub release, with the two env vars users can set to restore prior behaviour.

Test plan

  • uv run pytest — 384 tests pass
  • Manual: with default env, confirm Ctrl-A t/T/v/w/d/x/[ work and Ctrl-B D detaches
  • Manual: with FUJIMOTO_META_KEY=C-f FUJIMOTO_TMUX_PREFIX=C-a, confirm Ctrl-A is the tmux prefix again and Ctrl-F is the fujimoto chord
  • Manual: with FUJIMOTO_META_KEY=C-a FUJIMOTO_TMUX_PREFIX=C-a, confirm a clean TmuxError is surfaced

- Add FUJIMOTO_TMUX_PREFIX env var (default C-b, tmux's standard default)
- Swap FUJIMOTO_META_KEY default from C-f to C-a so the more ergonomic
  slot belongs to the fujimoto chord
- Raise TmuxError if the two keys collide
- Extend the fujimoto key table with d (detach), x (kill pane via
  confirm-before), and [ (copy mode) so users moving the prefix off
  C-a don't lose their common prefix bindings
- Update README and CLAUDE.md with the new defaults and a migration
  snippet that restores the old layout
@jongracecox
jongracecox merged commit db924d6 into main May 20, 2026
5 checks passed
@jongracecox
jongracecox deleted the worktree/20260520-fujimoto-meta-key branch May 20, 2026 17:11
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