Repository navigation
feat(home): org tmux keybindings and terminal defaults for vigos.multiplexer - #1606
Merged
Merged
Conversation
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.
Description
vigos.multiplexerset five options and no keybindings, and leftprograms.tmux.terminalat home-manager's default. Every consumer re-derivedthe same
extraConfigby hand, and a host running the module bare — a sharedremote development guest, a devcontainer — got none of it.
Two concrete symptoms, both from #1605:
prefix + X(kill the current session) lived only in a downstream personalconfig.
prefix + xstill worked there because kill-pane is a tmux default;Xis not, so a habit built on one machine silently did nothing on the next.programs.tmux.terminalevaluated to"screen": 8 colors, no italics. Everycolored tool the org ships — starship, neovim, delta, lazygit,
gh-dash—rendered degraded the moment it ran inside tmux, on every host.
Type of Change
feat-- New featureModifiers
!) -- This change breaks backward compatibilityNot breaking, but two behaviour caveats for a host already enabling the module
(both accepted in the issue's Impact section):
prefix + lbecomesselect-pane -Rrather than stocklast-window. Theonly default this replaces; coherent with the module's own
keyMode = "vi",and the cookbook now shows how to take the key back.
detach-on-destroy offchanges what happens to a client after its sessionends — it switches to another live session instead of dropping to a shell
(still detaches if that was the last one).
Changes Made
nix/home/multiplexer.nix:terminal = lib.mkDefault "tmux-256color"plusset -ga terminal-overrides ",*256col*:Tc"for truecolor.bind-key X confirm-before … kill-session—Xis unbound in stock tmux, sothis takes nothing away, and the prompt keeps a stray prefix from destroying
a project's layout.
renumber-windows,focus-events.set-clipboard on(OSC 52 — a yank on a remote host reaches the localclipboard with no X forwarding) and
v/yin copy mode, which the module'sown vi
keyModedoes not imply.detach-on-destroy off,set-titles/set-titles-string "#S".h/j/k/lpane selection.The block is a plain (not
mkAfter)extraConfigdefinition, so it landsbefore any
lib.mkAfterblock. tmux takes the last binding of a key, sothe override seam
vigos.seshalready uses forbind okeeps working, and aconsumer can take a key back the same way.
docs/home/COOKBOOK.mddocuments that seam.Deliberately not done: a per-group
enableoption (YAGNI —extraConfigisalready the seam and every option is
mkDefault), and nothing moved intovigos.sesh.Changelog Entry
Testing
just test)Three new tests in
tests/test_flake_checks.py, all reading the existingcached
_ci_full_config()eval slice (no new eval): the terminal default, thatevery binding reaches a host which only enables the module, and that the block
precedes
vigos.sesh'sbind oso the override seam still works. TDD — allthree committed red first (
screen != tmux-256color, thensubstring not found), then green.Manual Testing Details
The generated
tmux.confwas loaded into a real tmux 3.6a server on anisolated socket, and the resulting bindings/options read back — the eval
asserts the text, this asserts tmux actually accepts it:
terminal-overridesappends to tmux's own default rather than replacing it,and the merged
extraConfigends withbind o display-popup -E "sesh-picker"— sesh's
mkAfterstill last.Checklist
CHANGELOG.mdin the[Unreleased]section (and pasted the entry above)Additional Notes
The issue flagged group 6 (vim pane navigation) for review as the only item
that removes a tmux default. Implemented as specified — the issue's own Impact
section accepts the
prefix + ltrade — but it is the one thing worth anexplicit yes/no at review, and it is a two-line revert if the answer is no.
Refs: #1605