Skip to content

[codex] Make tmux a reproducible Codex-ready config#7

Merged
gsantovena merged 2 commits into
mainfrom
feat-tmux
May 10, 2026
Merged

[codex] Make tmux a reproducible Codex-ready config#7
gsantovena merged 2 commits into
mainfrom
feat-tmux

Conversation

@gsantovena

@gsantovena gsantovena commented May 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Track a tmux config and link it through the enhanced dotfiles installer.
  • Bootstrap TPM into ~/.config/tmux/plugins/tpm while keeping TPM-managed plugin checkouts ignored by Git.
  • Preserve Codex multiline input in Ghostty/tmux with CSI-u Shift+Enter handling and add Neovim tmux navigation mappings.
  • Preserve clickable URL support in tmux by advertising Ghostty hyperlink support and opening tmux-detected OSC 8 hyperlinks without disabling normal tmux mouse behavior.
  • Include requested shell startup helpers: SDKMAN initialization in Bash and Zsh line-editing/clipboard/git shortcut bindings.
  • Document the tmux/TPM workflow and add regression coverage for install, TPM bootstrap, tmux syntax, Ghostty syntax, Shift+Enter behavior, and clickable URL support.

Root cause

TPM plugin clones were being staged as embedded Git repositories because tmux/plugins/ was not ignored. Shift+Enter was collapsing before Codex could treat it as editor.insert_newline, so Ghostty and tmux needed an explicit CSI-u path. URL clicks were also blocked by tmux mouse handling and missing hyperlink feature negotiation for Ghostty.

Validation

  • make check
  • git diff --cached --check
  • bash -n bash_profile
  • zsh -n zshrc
  • tmux source-file tmux/tmux.conf
  • ghostty +validate-config --config-file=ghostty/config

Notes

The real TPM network clone on a fresh machine is not exercised by the tests; Bats covers the bootstrap path with a fake git clone. Manual clicking of a fresh OSC 8 hyperlink after a full terminal restart is not covered by automation.

gsantovena and others added 2 commits May 9, 2026 22:54
Track the tmux config and teach the installer to link it, bootstrap TPM, and leave TPM-managed plugin checkouts outside Git. The same change preserves Codex multiline input through Ghostty and tmux by using CSI-u Shift+Enter and a Codex keymap override, while pairing tmux navigation with Neovim mappings.

Constraint: TPM installs nested Git repositories under tmux/plugins, so that path must remain ignored rather than committed.\nRejected: Commit TPM plugins as submodules | TPM is already the plugin manager and submodules would duplicate ownership.\nRejected: Rely only on terminal feature negotiation for Shift+Enter | Ghostty restart still did not make Codex see multiline input reliably.\nConfidence: high\nScope-risk: moderate\nDirective: Do not track tmux/plugins; it is an install cache owned by TPM.\nTested: make check\nNot-tested: Live TPM network clone on a fresh machine; Bats covers bootstrap with a fake git clone.

Co-authored-by: OmX <omx@oh-my-codex.dev>
tmux mouse mode was intercepting hyperlink clicks before Ghostty could open them. The config now advertises Ghostty hyperlink support and opens tmux-detected OSC 8 hyperlinks directly while falling back to normal pane mouse behavior, and the same change carries the requested shell startup helpers into this PR.

Constraint: Mouse support must remain enabled for pane selection, scrolling, and existing tmux workflows.\nConstraint: User explicitly requested including the existing local bash/zsh edits in this commit.\nRejected: Disable tmux mouse mode | it would restore terminal URL clicking but regress tmux mouse UX.\nRejected: Leave shell helpers as separate local edits | user asked to add them to this commit.\nConfidence: medium\nScope-risk: moderate\nDirective: Keep non-link MouseDown1Pane behavior forwarding to tmux so mouse-enabled TUIs still receive clicks.\nTested: make check\nTested: bash -n bash_profile\nTested: zsh -n zshrc\nTested: tmux source-file tmux/tmux.conf\nTested: ghostty +validate-config --config-file=ghostty/config\nNot-tested: Manual click of an OSC 8 hyperlink after opening a fresh Ghostty window.

Co-authored-by: OmX <omx@oh-my-codex.dev>
@gsantovena gsantovena marked this pull request as ready for review May 10, 2026 05:09
@gsantovena gsantovena merged commit f1ec024 into main May 10, 2026
5 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.

1 participant