]> git.immae.eu Git - perso/Immae/Config/Ansible.git/blobdiff - roles/tools/templates/tmux.conf.j2
Move bash functions to separate scripts
[perso/Immae/Config/Ansible.git] / roles / tools / templates / tmux.conf.j2
index 8aad615ee7e41c9975ea7b6ce21414711dbbae59..07e88b96feef00a49adde38016cbb6ed8a90b83a 100644 (file)
@@ -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 \"fl_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'
@@ -65,24 +75,3 @@ set-window-option -g window-status-bell-style fg=yellow,bold,underscore
 set -g default-terminal screen-256color
 
 set -g mouse on
-
-{% if role.get(profile) == "fretlink" %}
-new-session -A -c "$HOME/workdir/admin-root" -s admin-root
-send-keys "../start" C-m
-rename-window "running"
-new-window
-new-session -A -c "$HOME/workdir/carrier-directory" -s carrier-directory
-send-keys "../start" C-m
-rename-window "running"
-new-window
-new-session -A -c "$HOME/workdir/notifier" -s notifier
-send-keys "../start" C-m
-rename-window "running"
-new-window
-new-session -A -c "$HOME/workdir/geodata" -s geodata
-new-session -A -c "$HOME/workdir/app" -s app
-send-keys "../start" C-m
-rename-window "running"
-new-window
-select-window -t 1
-{% endif %}