templier-ansible/roles/cli-utils/templates/tmux.conf.j2

35 lines
1.0 KiB
Django/Jinja

{{ ansible_header | comment }}
unbind r
bind r source-file ~/.tmux.conf
set -g mouse on
## set the default TERM
set -g default-terminal screen
## update the TERM variable of terminal emulator when creating a new session or attaching a existing session
set -g update-environment 'DISPLAY SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY TERM'
## determine if we should enable 256-colour support
if "[[ ${TERM} =~ 256color || ${TERM} == fbterm ]]" 'set -g default-terminal screen-256color'
# use the vim motion keys to move between panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
setw -g mode-keys vi
bind < resize-pane -L 10
bind > resize-pane -R 10
bind - resize-pane -D 10
bind + resize-pane -U 10
bind-key -T copy-mode-vi 'v' send -X begin-selection;
bind-key -T copy-mode-vi 'V' send -X select-line;
bind-key -T copy-mode-vi 'r' send -X rectangle-toggle;
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
set -g base-index 1
set -g status-bg colour41