Add -P to move-pane to move a floating pane to a specific place

(top-left, bottom-right). Get rid of the not-so-useful default { and }
swap-pane bindings and use the keys instead for moving to top-left,
top-right and add M-{ and M-} for bottom-left, bottom-right.
This commit is contained in:
nicm
2026-06-13 17:12:02 +00:00
parent aa2fd3a151
commit 19393e13db
3 changed files with 133 additions and 28 deletions

View File

@@ -406,8 +406,10 @@ key_bindings_init(void)
"bind -N 'Choose a window from a list' w { choose-tree -Zw }",
"bind -N 'Kill the active pane' x { confirm-before -p\"kill-pane #P? (y/n)\" kill-pane }",
"bind -N 'Zoom the active pane' z { resize-pane -Z }",
"bind -N 'Swap the active pane with the pane above' '{' { swap-pane -U }",
"bind -N 'Swap the active pane with the pane below' '}' { swap-pane -D }",
"bind -N 'Move pane to top-left corner' '{' { move-pane -P top-left }",
"bind -N 'Move pane to top-right corner' '}' { move-pane -P top-right }",
"bind -N 'Move pane to bottom-left corner' 'M-{' { move-pane -P bottom-left }",
"bind -N 'Move pane to bottom-right corner' 'M-}' { move-pane -P bottom-right }",
"bind -N 'Show messages' '~' { show-messages }",
"bind -N 'Enter copy mode and scroll up' PPage { copy-mode -u }",
"bind -N 'Select the pane above the active pane' -r Up { select-pane -U }",