feat(tmux): configurable tmux prefix + swapped chord defaults - #34
Merged
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FUJIMOTO_TMUX_PREFIXenv var (defaultC-b) configures the tmux prefix per session.FUJIMOTO_META_KEYdefault swapped fromC-ftoC-a. Restore the old layout withFUJIMOTO_META_KEY=C-f FUJIMOTO_TMUX_PREFIX=C-a.TmuxErrorif the two keys collide.d(detach),x(confirm-beforekill-pane), and[(copy-mode) so moving the prefix offC-adoesn't cost users their three common prefix bindings.Motivation
The previous defaults put the tmux prefix on
Ctrl-Aand the fujimoto chord onCtrl-F. Muscle-memory drift meantCtrl-A tkept 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 standardC-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 passCtrl-A t/T/v/w/d/x/[work andCtrl-B DdetachesFUJIMOTO_META_KEY=C-f FUJIMOTO_TMUX_PREFIX=C-a, confirmCtrl-Ais the tmux prefix again andCtrl-Fis the fujimoto chordFUJIMOTO_META_KEY=C-a FUJIMOTO_TMUX_PREFIX=C-a, confirm a cleanTmuxErroris surfaced