summaryrefslogtreecommitdiff
path: root/roles/tools/templates/tmux.conf.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/tools/templates/tmux.conf.j2')
-rw-r--r--roles/tools/templates/tmux.conf.j288
1 files changed, 88 insertions, 0 deletions
diff --git a/roles/tools/templates/tmux.conf.j2 b/roles/tools/templates/tmux.conf.j2
new file mode 100644
index 0000000..8aad615
--- /dev/null
+++ b/roles/tools/templates/tmux.conf.j2
@@ -0,0 +1,88 @@
1# Pour les nostalgiques de screen
2# comme les raccourcis ne sont pas les mêmes, j'évite
3set-option -g prefix C-a
4unbind-key C-b
5bind-key a send-prefix
6
7bind-key C-d detach
8unbind-key C-z
9bind-key C-z resize-pane -Z
10bind-key h switch-client -t remote
11
12unbind-key )
13unbind-key (
14bind-key -r ( switch-client -p
15bind-key -r ) switch-client -n
16
17bind-key -n M-Left previous-window
18bind-key -n M-Right next-window
19bind-key -n M-PageDown switch-client -n
20bind-key -n M-PageUp switch-client -p
21
22bind-key M set-window-option monitor-activity
23bind-key u capture-pane \; save-buffer /tmp/tmux-buffer \; new-window -n "urlview" '$SHELL -c "urlview < /tmp/tmux-buffer; rm -f /tmp/tmux-buffer"'
24
25bind-key C-c run-shell -b "tmux save-buffer - | xclip -i -sel clipboard"
26bind-key C-v run-shell "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
27
28bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-selection-and-cancel \; run-shell -b "tmux save-buffer - | xclip -i -selection primary"
29bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-selection-and-cancel \; run-shell -b "tmux save-buffer - | xclip -i -selection primary"
30bind-key -T root MouseUp2Pane run-shell "tmux set-buffer \"$(xclip -o -selection primary)\"; tmux paste-buffer"
31
32# même hack que sur screen lorsqu'on veut profiter du scroll du terminal
33# (xterm ...)
34set-option -g terminal-overrides 'xterm*:smcup@:rmcup@:Tc'
35
36# Renumeroter les fenetres quand on en ferme une
37set-option -g renumber-windows on
38
39#Pour les ctrl+arrow
40set-option -g xterm-keys on
41
42# c'est un minimum (defaut 2000)
43set-option -g history-limit 10000
44
45# lorsque j'ai encore un tmux ailleurs seule
46# sa fenetre active réduit la taille de ma fenetre locale
47set-window-option -g aggressive-resize on
48
49# Pour etre alerté sur une alerte dans une autre fenêtre
50set-option -g visual-activity off
51set-option -g visual-bell off
52
53# numéroter a partir de 1, pratique pour l'accès direct
54set-option -g base-index 1
55
56# repercuter le contenu de la fenetre dans la barre de titre
57# reference des string : man tmux (status-left)
58set-option -g set-titles on
59set-option -g set-titles-string '#H #W #T' # host window command
60
61set-option -g update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY XDG_VTNR"
62
63set-window-option -g window-status-bell-style fg=yellow,bold,underscore
64
65set -g default-terminal screen-256color
66
67set -g mouse on
68
69{% if role.get(profile) == "fretlink" %}
70new-session -A -c "$HOME/workdir/admin-root" -s admin-root
71send-keys "../start" C-m
72rename-window "running"
73new-window
74new-session -A -c "$HOME/workdir/carrier-directory" -s carrier-directory
75send-keys "../start" C-m
76rename-window "running"
77new-window
78new-session -A -c "$HOME/workdir/notifier" -s notifier
79send-keys "../start" C-m
80rename-window "running"
81new-window
82new-session -A -c "$HOME/workdir/geodata" -s geodata
83new-session -A -c "$HOME/workdir/app" -s app
84send-keys "../start" C-m
85rename-window "running"
86new-window
87select-window -t 1
88{% endif %}