1 # Pour les nostalgiques de screen
2 # comme les raccourcis ne sont pas les mêmes, j'évite
3 set-option -g prefix C-a
9 bind-key C-z resize-pane -Z
10 bind-key h switch-client -t remote
14 bind-key -r ( switch-client -p
15 bind-key -r ) switch-client -n
17 bind-key -n M-Left previous-window
18 bind-key -n M-Right next-window
19 bind-key -n M-PageDown switch-client -n
20 bind-key -n M-PageUp switch-client -p
21 # duplicates to ensure continuity with "off" key-table
22 bind-key -n C-M-PageDown switch-client -n
23 bind-key -n C-M-PageUp switch-client -p
25 bind-key M set-window-option monitor-activity
26 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"'
28 bind-key C-c run-shell -b "tmux save-buffer - | xclip -i -sel clipboard"
29 bind-key C-v run-shell "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
31 bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-selection-and-cancel \; run-shell -b "tmux save-buffer - | xclip -i -selection primary"
32 bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-selection-and-cancel \; run-shell -b "tmux save-buffer - | xclip -i -selection primary"
33 bind-key -T root MouseUp2Pane run-shell "tmux set-buffer \"$(xclip -o -selection primary)\"; tmux paste-buffer"
35 bind-key -T root F12 set-option prefix None \; set-option key-table off \; set-option status-style "bg=black"
36 bind-key -T off F12 set-option -u prefix \; set-option -u key-table \; set-option -u status-style
37 bind-key -T off C-M-PageDown switch-client -n
38 bind-key -T off C-M-PageUp switch-client -p
40 bind-key Tab command-prompt -p "which session?" "run-shell \"fl_tmux_dev %1\""
42 # même hack que sur screen lorsqu'on veut profiter du scroll du terminal
44 set-option -g terminal-overrides 'xterm*:smcup@:rmcup@:Tc'
46 # Renumeroter les fenetres quand on en ferme une
47 set-option -g renumber-windows on
50 set-option -g xterm-keys on
52 # c'est un minimum (defaut 2000)
53 set-option -g history-limit 10000
55 # lorsque j'ai encore un tmux ailleurs seule
56 # sa fenetre active réduit la taille de ma fenetre locale
57 set-window-option -g aggressive-resize on
59 # Pour etre alerté sur une alerte dans une autre fenêtre
60 set-option -g visual-activity off
61 set-option -g visual-bell off
63 # numéroter a partir de 1, pratique pour l'accès direct
64 set-option -g base-index 1
66 # repercuter le contenu de la fenetre dans la barre de titre
67 # reference des string : man tmux (status-left)
68 set-option -g set-titles on
69 set-option -g set-titles-string '#H #W #T' # host window command
71 set-option -g update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY XDG_VTNR"
73 set-window-option -g window-status-bell-style fg=yellow,bold,underscore
75 set -g default-terminal screen-256color
78 set -g detach-on-destroy off