From 2c02fe2aa9c014f7f1e922da75ab45b98da45f09 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Sun, 18 Nov 2018 13:19:26 +0100 Subject: [PATCH] Add keys to nest tmux --- roles/tools/templates/tmux.conf.j2 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/roles/tools/templates/tmux.conf.j2 b/roles/tools/templates/tmux.conf.j2 index a7ac4ce..0313336 100644 --- a/roles/tools/templates/tmux.conf.j2 +++ b/roles/tools/templates/tmux.conf.j2 @@ -18,6 +18,9 @@ bind-key -n M-Left previous-window bind-key -n M-Right next-window bind-key -n M-PageDown switch-client -n bind-key -n M-PageUp switch-client -p +# duplicates to ensure continuity with "off" key-table +bind-key -n C-M-PageDown switch-client -n +bind-key -n C-M-PageUp switch-client -p bind-key M set-window-option monitor-activity bind-key u capture-pane \; save-buffer /tmp/tmux-buffer \; new-window -n "urlview" '$SHELL -c "urlview < /tmp/tmux-buffer; rm -f /tmp/tmux-buffer"' @@ -29,6 +32,13 @@ bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-selection-and-cancel \ bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-selection-and-cancel \; run-shell -b "tmux save-buffer - | xclip -i -selection primary" bind-key -T root MouseUp2Pane run-shell "tmux set-buffer \"$(xclip -o -selection primary)\"; tmux paste-buffer" +bind-key -T root F12 set-option prefix None \; set-option key-table off \; set-option status-style "bg=black" +bind-key -T off F12 set-option -u prefix \; set-option -u key-table \; set-option -u status-style +bind-key -T off C-M-PageDown switch-client -n +bind-key -T off C-M-PageUp switch-client -p + +bind-key Tab command-prompt -p "which session?" "run-shell \"bash -i -c 'tmux_dev %1'\"" + # même hack que sur screen lorsqu'on veut profiter du scroll du terminal # (xterm ...) set-option -g terminal-overrides 'xterm*:smcup@:rmcup@:Tc' -- 2.41.0