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
|
|
|
|
2020-12-19 19:44:15 +01:00
|
|
|
# copy to system clipboard
|
|
|
|
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -se c -i'
|
|
|
|
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'xclip -se c -i'
|
|
|
|
|
|
|
|
# enable mouse
|
|
|
|
# setw -g mode-mouse on
|
|
|
|
# set -g mouse-select-window on
|
|
|
|
set -g mouse on
|
|
|
|
|
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
|
|
|
|
2020-04-21 00:02:46 +02:00
|
|
|
bind-key -n M-s set-option status
|
2018-11-30 13:36:35 +01:00
|
|
|
|
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
|
2020-04-21 00:02:46 +02:00
|
|
|
set-window-option -g clock-mode-colour green
|
2018-11-30 13:36:35 +01:00
|
|
|
|
|
|
|
# bell
|
2020-12-19 19:41:34 +01:00
|
|
|
set-window-option -g window-status-bell-style fg=color0,bg=red
|
2018-11-30 13:36:35 +01:00
|
|
|
|
2020-04-10 13:49:27 +02:00
|
|
|
# default statusbar colors
|
2021-09-05 21:40:47 +02:00
|
|
|
set -g status-bg "#1a1d1c"
|
2020-04-10 13:49:27 +02:00
|
|
|
|
2018-11-30 13:36:35 +01:00
|
|
|
# term color
|
2022-02-22 22:34:59 +01:00
|
|
|
set -g default-terminal "screen-256color"
|
|
|
|
set-option -sa terminal-overrides ",xterm-kitty:RGB"
|
2019-05-10 00:39:42 +02:00
|
|
|
|
|
|
|
# right status
|
2020-04-16 20:29:36 +02:00
|
|
|
set -g status-right '#[fg=#51000f]#[bg=#51000f]#[fg=#ffffff] %H:%M %d-%b '
|
2019-05-10 00:39:42 +02:00
|
|
|
|
|
|
|
# left status
|
2021-09-05 21:40:47 +02:00
|
|
|
set -g status-left '#[bg=#1A202C]#[fg=#ffffff]#{?client_prefix,#[bg=#51000f],} ❐ #[bg=#1a1d1c]#[fg=#1A202C]#{?client_prefix,#[fg=#51000f],}#{?window_zoomed_flag, #[fg=colour7]🔍 ,} '
|
2019-05-10 00:39:42 +02:00
|
|
|
|
|
|
|
# current window status
|
2021-09-05 21:40:47 +02:00
|
|
|
set -g window-status-current-format "#[fg=#1a1d1c]#[bg=#51000f]#[fg=colour7]#[bg=#51000f] #I #[fg=colour7] #W #[fg=#51000f]#[bg=#1a1d1c]"
|
2019-05-10 00:39:42 +02:00
|
|
|
|
|
|
|
# normal window status
|
2021-09-05 21:40:47 +02:00
|
|
|
set -g window-status-format "#[fg=colour244]#[bg=#1a1d1c]#I #[fg=colour240] #W"
|
2019-05-10 00:39:42 +02:00
|
|
|
|
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"
|