2020-03-27 22:13:20 +00:00
|
|
|
# remap prefix to Ctrl + a
|
|
|
|
set -g prefix C-a
|
|
|
|
unbind C-b
|
|
|
|
bind C-a send-prefix
|
|
|
|
|
|
|
|
# force a reload of the config file
|
|
|
|
unbind r
|
|
|
|
bind r source-file ~/.tmux.conf
|
|
|
|
|
|
|
|
# shorter timing
|
|
|
|
set -g repeat-time 200
|
|
|
|
|
2020-03-27 22:30:50 +00:00
|
|
|
{% if not (ansible_distribution == "CentOS" and ansible_distribution_major_version|int <= 7) %}
|
2020-03-27 22:13:20 +00:00
|
|
|
# configure mouse
|
|
|
|
setw -g mouse on
|
2020-03-27 22:30:50 +00:00
|
|
|
{% endif %}
|
2020-03-27 22:13:20 +00:00
|
|
|
|
|
|
|
# don't rename windows automatically
|
|
|
|
set-option -g allow-rename off
|
|
|
|
|
|
|
|
# set some other options
|
|
|
|
setw -g mode-keys vi
|
|
|
|
set -g default-terminal "screen-256color"
|
|
|
|
|
|
|
|
# use index from 1 for easier typing/ switching
|
|
|
|
set -g base-index 1
|
|
|
|
setw -g pane-base-index 1
|
|
|
|
|
|
|
|
# status bar
|
|
|
|
#set -g status-right '#[fg=white]#(hostname)@#(host `hostname` | cut -d " " -f 4)'
|
|
|
|
set-window-option -g status-left " #S "
|
2020-03-27 22:30:50 +00:00
|
|
|
{% if ansible_distribution == "CentOS" and ansible_distribution_major_version|int <= 7 %}
|
|
|
|
set-window-option -g status-left-fg black
|
|
|
|
set-window-option -g status-left-bg white
|
|
|
|
{% else %}
|
2020-03-27 22:13:20 +00:00
|
|
|
set-window-option -g status-left-style fg=black,bg=white
|
2020-03-27 22:30:50 +00:00
|
|
|
{% endif %}
|
2020-03-27 22:13:20 +00:00
|
|
|
|
|
|
|
set-window-option -g status-right " %H:%M %Y-%m-%d | #(hostname) "
|
2020-03-27 22:30:50 +00:00
|
|
|
{% if ansible_distribution == "CentOS" and ansible_distribution_major_version|int <= 7 %}
|
|
|
|
set-window-option -g status-right-fg black
|
|
|
|
set-window-option -g status-right-bg white
|
|
|
|
{% else %}
|
2020-03-27 22:13:20 +00:00
|
|
|
set-window-option -g status-right-style fg=black,bg=white
|
2020-03-27 22:30:50 +00:00
|
|
|
{% endif %}
|
2020-03-27 22:13:20 +00:00
|
|
|
|
|
|
|
set-window-option -g window-status-format " #I: #W "
|
|
|
|
|
|
|
|
set-window-option -g window-status-current-format " #I: #W "
|
2020-03-27 22:30:50 +00:00
|
|
|
{% if ansible_distribution == "CentOS" and ansible_distribution_major_version|int <= 7 %}
|
|
|
|
set-window-option -g window-status-current-fg green
|
|
|
|
set-window-option -g window-status-current-bg black
|
|
|
|
{% else %}
|
2020-03-27 22:13:20 +00:00
|
|
|
set-window-option -g window-status-current-style fg=green,bg=black
|
2020-03-27 22:30:50 +00:00
|
|
|
{% endif %}
|