Skip to content

Add .tmux.conf layout preset key bindings#112

Open
limijd wants to merge 1 commit intomainfrom
codex/add-pane-layout-presets-to-tmux.conf
Open

Add .tmux.conf layout preset key bindings#112
limijd wants to merge 1 commit intomainfrom
codex/add-pane-layout-presets-to-tmux.conf

Conversation

@limijd
Copy link
Copy Markdown
Owner

@limijd limijd commented Mar 13, 2026

Motivation

  • Provide quick, repeatable workspace layouts for development and monitoring workflows via tmux key bindings.

Description

  • Add a repository-level .tmux.conf that defines layout presets bound to prefix + 1/2/3/4/6/8, a zoom toggle on prefix + 9, and a grid auto-arrange helper on prefix + g.
  • Implement pane creation for multi-pane presets using a POSIX-compatible while loop inside run-shell for better portability in /bin/sh contexts.
  • Use tmux select-layout variants (even-horizontal, tiled) to normalize final pane arrangements.

Testing

  • Verified the bundled tmux binary with ./tools/linux_x86_64/tmux/3.5a/tmux -V, which returned a valid version string.
  • Loaded and sourced the new configuration using ./tools/linux_x86_64/tmux/3.5a/tmux -f .tmux.conf -L nvimprokit-test start-server \; source-file .tmux.conf \; kill-server, which completed without errors.

Codex Task

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: de35ee7aad

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# -------------------------

# 1 pane (focus mode)
bind-key 1 run-shell "tmux kill-pane -a"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid shelling out to plain tmux in layout bindings

These presets run via run-shell and then invoke tmux by name, which fails when the server was started from a non-PATH binary (for example the vendored ./tools/.../tmux path) or on hosts without a global tmux install; in that setup the command returns 127 and the layout shortcut does nothing. Prefer native tmux command chaining for these bindings (or otherwise avoid relying on PATH resolution for tmux) so the presets work with the same binary that started the session.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant