]> git.immae.eu Git - perso/Immae/Config/Ansible.git/blob - roles/tools/templates/tmux.conf.j2
Move bash functions to separate scripts
[perso/Immae/Config/Ansible.git] / roles / tools / templates / tmux.conf.j2
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
4 unbind-key C-b
5 bind-key a send-prefix
6
7 bind-key C-d detach
8 unbind-key C-z
9 bind-key C-z resize-pane -Z
10 bind-key h switch-client -t remote
11
12 unbind-key )
13 unbind-key (
14 bind-key -r ( switch-client -p
15 bind-key -r ) switch-client -n
16
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
24
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"'
27
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"
30
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"
34
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
39
40 bind-key Tab command-prompt -p "which session?" "run-shell \"fl_tmux_dev %1\""
41
42 # même hack que sur screen lorsqu'on veut profiter du scroll du terminal
43 # (xterm ...)
44 set-option -g terminal-overrides 'xterm*:smcup@:rmcup@:Tc'
45
46 # Renumeroter les fenetres quand on en ferme une
47 set-option -g renumber-windows on
48
49 #Pour les ctrl+arrow
50 set-option -g xterm-keys on
51
52 # c'est un minimum (defaut 2000)
53 set-option -g history-limit 10000
54
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
58
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
62
63 # numéroter a partir de 1, pratique pour l'accès direct
64 set-option -g base-index 1
65
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
70
71 set-option -g update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY XDG_VTNR"
72
73 set-window-option -g window-status-bell-style fg=yellow,bold,underscore
74
75 set -g default-terminal screen-256color
76
77 set -g mouse on