66 lines
2 KiB
Bash
66 lines
2 KiB
Bash
#### COLOUR (Solarized dark)
|
|
|
|
# set vi keys
|
|
set-window-option -g mode-keys vi
|
|
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
|
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
|
|
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
|
|
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
|
|
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
|
|
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
|
|
bind-key -T copy-mode-vi C-h select-pane -L
|
|
bind-key -T copy-mode-vi C-j select-pane -D
|
|
bind-key -T copy-mode-vi C-k select-pane -U
|
|
bind-key -T copy-mode-vi C-l select-pane -R
|
|
|
|
# default statusbar colors
|
|
set-option -g status-bg black
|
|
|
|
# reload tmux.conf with <prefix>-r
|
|
unbind r
|
|
bind r \
|
|
source-file ~/.tmux.conf \;\
|
|
display 'Reloaded tmux config'
|
|
|
|
# pane number display
|
|
set-option -g display-panes-active-colour blue #blue
|
|
set-option -g display-panes-colour brightred #orange
|
|
|
|
# start numbering at 1
|
|
set -g base-index 1
|
|
set -g pane-base-index 1
|
|
|
|
# renew statusline every 10 seconds
|
|
set -g status-interval 10
|
|
|
|
# clock
|
|
set-window-option -g clock-mode-colour green #green
|
|
|
|
# bell
|
|
set-window-option -g window-status-bell-style fg=black,bg=red #base02, red
|
|
|
|
# term color
|
|
set -g default-terminal "screen-256color"
|
|
|
|
# right status
|
|
set -g status-right '#[fg=colour3]#[fg=colour1]#[bg=colour1]#[fg=colour7] %H:%M %d-%b '
|
|
|
|
# left status
|
|
set -g status-left '#[bg=colour1]#[fg=colour0]#{?client_prefix,#[bg=colour2],} ❐ #[bg=colour8]#[fg=colour1]#{?client_prefix,#[fg=colour2],}#{?window_zoomed_flag, 🔍 ,}#[fg=colour1] '
|
|
|
|
# current window status
|
|
set -g window-status-current-format "#[fg=colour8]#[bg=colour1]#[fg=colour7]#[bg=colour1] #I #[fg=colour7] #W #[fg=colour1]#[bg=colour8]"
|
|
|
|
# normal window status
|
|
set -g window-status-format "#[fg=colour244]#[bg=colour8]#I #[fg=colour240] #W"
|
|
|
|
# escape time
|
|
set-option -sg escape-time 10
|
|
|
|
# COLOURS
|
|
#colour0 (black)
|
|
#colour1 (red)
|
|
#colour2 (green)
|
|
#colour3 (yellow)
|
|
#colour4 (blue)
|
|
#colour7 (white)
|