mirror of
https://github.com/tmux/tmux.git
synced 2026-07-09 02:49:30 +00:00
Add floating panes key bindings and menu options, from Dane Jensen.
This commit is contained in:
@@ -59,12 +59,14 @@
|
||||
" '#{?mouse_hyperlink,Type #[underscore]#{=/9/...:mouse_hyperlink},}' 'C-h' {copy-mode -q; send-keys -l -- \"#{q:mouse_hyperlink}\"}" \
|
||||
" '#{?mouse_hyperlink,Copy #[underscore]#{=/9/...:mouse_hyperlink},}' 'h' {copy-mode -q; set-buffer -- \"#{q:mouse_hyperlink}\"}" \
|
||||
" ''" \
|
||||
" '#{?#{#{pane_floating_flag}},Tile,}' 't' { join-pane }" \
|
||||
" '#{?#{!:#{pane_floating_flag}},Float,}' 'f' { break-pane -W }" \
|
||||
" '#{?#{!:#{pane_floating_flag}},Horizontal Split,}' 'h' {split-window -h}" \
|
||||
" '#{?#{!:#{pane_floating_flag}},Vertical Split,}' 'v' {split-window -v}" \
|
||||
" ''" \
|
||||
" '#{?#{&&:#{!:#{pane_floating_flag}},#{>:#{window_panes},1}},Swap Up,}' 'u' {swap-pane -U}" \
|
||||
" '#{?#{&&:#{!:#{pane_floating_flag}},#{>:#{window_panes},1}},Swap Down,}' 'd' {swap-pane -D}" \
|
||||
" '#{?#{!:#{pane_floating_flag}},#{?pane_marked_set,,-}Swap Marked,}' 's' {swap-pane}" \
|
||||
" '#{?pane_marked_set,,-}Swap Marked' 's' {swap-pane}" \
|
||||
" ''" \
|
||||
" 'Kill' 'X' {kill-pane}" \
|
||||
" 'Respawn' 'R' {respawn-pane -k}" \
|
||||
@@ -362,6 +364,7 @@ key_bindings_init(void)
|
||||
"bind -N 'Kill current window' & { confirm-before -p\"kill-window #W? (y/n)\" kill-window }",
|
||||
"bind -N 'Prompt for window index to select' \"'\" { command-prompt -T window-target -pindex { select-window -t ':%%' } }",
|
||||
"bind -N 'New floating pane' * { new-pane }",
|
||||
"bind -N 'Toggle pane between floating and tiled' @ { if -F '#{pane_floating_flag}' { join-pane } { break-pane -W } }",
|
||||
"bind -N 'Switch to previous client' ( { switch-client -p }",
|
||||
"bind -N 'Switch to next client' ) { switch-client -n }",
|
||||
"bind -N 'Rename current window' , { command-prompt -I'#W' { rename-window -- '%%' } }",
|
||||
@@ -479,6 +482,7 @@ key_bindings_init(void)
|
||||
/* Mouse button 1 down on default pane-border-format */
|
||||
"bind -n MouseDown1Control9 { display-menu -t= -xM -yM -O -T 'Kill pane #{pane_index}?' 'Yes' 'y' { kill-pane -t= } 'No' 'n' {}}",
|
||||
"bind -n MouseDown1Control8 { resize-pane -Z }",
|
||||
"bind -n MouseDown1Control7 { if -Ft= '#{pane_floating_flag}' { join-pane } { break-pane -W } }",
|
||||
|
||||
/* Mouse wheel down on status line. */
|
||||
"bind -n WheelDownStatus { next-window }",
|
||||
|
||||
@@ -1539,6 +1539,9 @@ const struct options_table_entry options_table[] = {
|
||||
"\"#{pane_title}\""
|
||||
"#{?#{mouse},"
|
||||
"#[align=right]"
|
||||
"#[range=control|7]["
|
||||
"#{?#{pane_floating_flag},t,f}"
|
||||
"]#[norange]"
|
||||
"#[range=control|8]["
|
||||
"#{?#{window_zoomed_flag},u,z}"
|
||||
"]#[norange]"
|
||||
|
||||
Reference in New Issue
Block a user