2017-05-21 14:02:16 +02:00
|
|
|
# Set $TERM env
|
|
|
|
set -g default-terminal "screen-256color"
|
|
|
|
|
|
|
|
# Set prefix to ^A
|
|
|
|
unbind C-b
|
|
|
|
set -g prefix C-a
|
|
|
|
bind C-a send-prefix
|
|
|
|
|
|
|
|
# Navigation
|
|
|
|
## Navigation in panes with C+hjkl integrated with vim
|
|
|
|
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
|
|
|
|
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
|
|
|
|
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
|
|
|
|
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
|
|
|
|
## Navigation in windows with alt+shift+jk
|
|
|
|
bind -n M-j select-window -p
|
|
|
|
bind -n M-k select-window -n
|
|
|
|
|
|
|
|
# Splitting
|
|
|
|
unbind %
|
|
|
|
unbind '"'
|
|
|
|
bind | split-window -h
|
|
|
|
bind - split-window -v
|
|
|
|
|
|
|
|
# Set window notifications
|
|
|
|
setw -g monitor-activity on
|
|
|
|
set -g visual-activity on
|
|
|
|
|
|
|
|
# Reload tmux conf
|
|
|
|
unbind r
|
|
|
|
bind r source-file ~/.tmux.conf \; display-message " Config reloaded".
|
|
|
|
|
|
|
|
|
|
|
|
# Status bar
|
2017-05-21 14:33:38 +02:00
|
|
|
set -g status-bg colour237
|
|
|
|
set -g status-fg colour216
|
|
|
|
set -g status-attr dim
|
2017-05-21 14:02:16 +02:00
|
|
|
set-option -g status-left '#[fg=colour196][#[fg=default]#S#[fg=colour196]]#[fg=default] '
|
|
|
|
set-option -g status-right \
|
2017-05-21 14:33:38 +02:00
|
|
|
'#[fg=colour196][#[fg=default]#(echo $USER)#[fg=colour196]@\
|
2017-05-21 14:02:16 +02:00
|
|
|
#[fg=default]#h#[fg=colour196]]#[fg=default] \
|
|
|
|
#[fg=colour196][#[fg=default]#(date "+%H:%M %F")#[fg=colour196]]#[fg=defaultb'
|
|
|
|
|
|
|
|
# Current window
|
|
|
|
set-window-option -g window-status-current-bg colour215
|
|
|
|
set-window-option -g window-status-current-fg colour88
|
|
|
|
set-window-option -g window-status-current-format ' #I:#W#F '
|