# Pour les nostalgiques de screen # comme les raccourcis ne sont pas les mêmes, j'évite set-option -g prefix C-a unbind-key C-b bind-key a send-prefix bind-key C-d detach unbind-key C-z bind-key C-z resize-pane -Z bind-key h switch-client -t remote unbind-key ) unbind-key ( bind-key -r ( switch-client -p bind-key -r ) switch-client -n 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 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"' bind-key C-c run-shell -b "tmux save-buffer - | xclip -i -sel clipboard" bind-key C-v run-shell "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer" bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-selection-and-cancel \; run-shell -b "tmux save-buffer - | xclip -i -selection primary" 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" # même hack que sur screen lorsqu'on veut profiter du scroll du terminal # (xterm ...) set-option -g terminal-overrides 'xterm*:smcup@:rmcup@:Tc' # Renumeroter les fenetres quand on en ferme une set-option -g renumber-windows on #Pour les ctrl+arrow set-option -g xterm-keys on # c'est un minimum (defaut 2000) set-option -g history-limit 10000 # lorsque j'ai encore un tmux ailleurs seule # sa fenetre active réduit la taille de ma fenetre locale set-window-option -g aggressive-resize on # Pour etre alerté sur une alerte dans une autre fenêtre set-option -g visual-activity off set-option -g visual-bell off # numéroter a partir de 1, pratique pour l'accès direct set-option -g base-index 1 # repercuter le contenu de la fenetre dans la barre de titre # reference des string : man tmux (status-left) set-option -g set-titles on set-option -g set-titles-string '#H #W #T' # host window command set-option -g update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY XDG_VTNR" 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 @@%}