2018-11-30 13:36:35 +01:00
|
|
|
#### COLOUR (Solarized dark)
|
|
|
|
|
2018-12-04 21:55:01 +01:00
|
|
|
# set vi keys
|
|
|
|
set-window-option -g mode-keys vi
|
2018-12-22 15:28:44 +01:00
|
|
|
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
|
2018-12-04 21:55:01 +01:00
|
|
|
|
2019-05-10 00:39:42 +02:00
|
|
|
# reload tmux.conf with <prefix>-r
|
|
|
|
unbind r
|
|
|
|
bind r \
|
|
|
|
source-file ~/.tmux.conf \;\
|
|
|
|
display 'Reloaded tmux config'
|
2018-11-30 13:36:35 +01:00
|
|
|
|
2020-04-10 13:47:40 +02:00
|
|
|
bind -n M-h previous-window
|
|
|
|
bind -n M-l next-window
|
|
|
|
bind -n M-j switch-client -n
|
|
|
|
bind -n M-k switch-client -p
|
2020-04-10 13:49:27 +02:00
|
|
|
|
2018-11-30 13:36:35 +01:00
|
|
|
# pane number display
|
|
|
|
set-option -g display-panes-active-colour blue #blue
|
|
|
|
set-option -g display-panes-colour brightred #orange
|
|
|
|
|
2019-05-10 00:39:42 +02:00
|
|
|
# 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
|
|
|
|
|
2018-11-30 13:36:35 +01:00
|
|
|
# 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
|
|
|
|
|
2020-04-10 13:49:27 +02:00
|
|
|
# default statusbar colors
|
|
|
|
set-option -g status-bg black
|
|
|
|
|
2018-11-30 13:36:35 +01:00
|
|
|
# term color
|
|
|
|
set -g default-terminal "screen-256color"
|
2020-04-10 13:49:27 +02:00
|
|
|
set-option -ga terminal-overrides ",xterm-256color:Tc"
|
2019-05-10 00:39:42 +02:00
|
|
|
|
|
|
|
# right status
|
2020-04-10 13:49:27 +02:00
|
|
|
set -g status-right '#[fg=colour3]#[fg=#51000f]#[bg=#51000f]#[fg=#ffffff] %H:%M %d-%b '
|
2019-05-10 00:39:42 +02:00
|
|
|
|
|
|
|
# left status
|
2020-04-10 13:49:27 +02:00
|
|
|
set -g status-left '#[bg=#1A202C]#[fg=#ffffff]#{?client_prefix,#[bg=#51000f],} ❐ #[bg=colour8]#[fg=#1A202C]#{?client_prefix,#[fg=#51000f],}#{?window_zoomed_flag, 🔍 ,} '
|
2019-05-10 00:39:42 +02:00
|
|
|
|
|
|
|
# current window status
|
2020-04-10 13:49:27 +02:00
|
|
|
set -g window-status-current-format "#[fg=colour8]#[bg=#51000f]#[fg=colour7]#[bg=#51000f] #I #[fg=colour7] #W #[fg=#51000f]#[bg=colour8]"
|
2019-05-10 00:39:42 +02:00
|
|
|
|
|
|
|
# normal window status
|
|
|
|
set -g window-status-format "#[fg=colour244]#[bg=colour8]#I #[fg=colour240] #W"
|
|
|
|
|
2019-08-23 12:53:49 +02:00
|
|
|
# escape time
|
|
|
|
set-option -sg escape-time 10
|
|
|
|
|
2020-04-10 13:49:27 +02:00
|
|
|
set -g status-justify "left"
|
|
|
|
|
2019-05-10 00:39:42 +02:00
|
|
|
# COLOURS
|
|
|
|
#colour0 (black)
|
|
|
|
#colour1 (red)
|
|
|
|
#colour2 (green)
|
|
|
|
#colour3 (yellow)
|
|
|
|
#colour4 (blue)
|
|
|
|
#colour7 (white)
|