Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .tmux.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# -------------------------
# Developer Layout Presets
# -------------------------

# 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 👍 / 👎.


# 2 panes (dev mode)
bind-key 2 run-shell "
tmux kill-pane -a
tmux split-window -h
tmux select-layout even-horizontal
"

# 3 panes
bind-key 3 run-shell "
tmux kill-pane -a
tmux split-window -h
tmux split-window -v
tmux select-layout tiled
"

# 4 panes
bind-key 4 run-shell "
tmux kill-pane -a
tmux split-window -h
tmux split-window -v
tmux select-pane -t 0
tmux split-window -v
tmux select-layout tiled
"

# 6 panes
bind-key 6 run-shell "
tmux kill-pane -a
i=1
while [ \"$i\" -le 5 ]; do
tmux split-window
i=$((i + 1))
done
tmux select-layout tiled
"

# 8 panes (monitor mode)
bind-key 8 run-shell "
tmux kill-pane -a
i=1
while [ \"$i\" -le 7 ]; do
tmux split-window
i=$((i + 1))
done
tmux select-layout tiled
"

# 9: toggle zoom for current pane
bind-key 9 resize-pane -Z

# Grid auto-arrange helper
bind-key g select-layout tiled