-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
73 lines (61 loc) · 2.95 KB
/
.tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'sainnhe/tmux-fzf'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @resurrect-strategy-nvim 'session'
set -g @continuum-restore 'off'
set -g mouse on
# Truecolor
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
# unbind C-b
set-option -g prefix2 C-Space
bind C-Space send-prefix
# Stop tmux/vim messing around
set -s escape-time 0
# enable smart number toggling in neovim
set-option -g focus-events on
run -b '~/.tmux/plugins/tpm/tpm'
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?)(diff)?$'"
bind-key -n 'M-Left' if-shell "$is_vim" 'send-keys M-Left' 'select-pane -L'
bind-key -n 'M-Down' if-shell "$is_vim" 'send-keys M-Down' 'select-pane -D'
bind-key -n 'M-Up' if-shell "$is_vim" 'send-keys M-Up' 'select-pane -U'
bind-key -n 'M-Right' if-shell "$is_vim" 'send-keys M-Right' 'select-pane -R'
bind-key -n 'M-p' if-shell "$is_vim" 'send-keys M-p' 'select-pane -l'
bind 'h' if-shell "$is_vim" 'send-keys M-Left' 'select-pane -L'
bind 'j' if-shell "$is_vim" 'send-keys M-Down' 'select-pane -D'
bind 'k' if-shell "$is_vim" 'send-keys M-Up' 'select-pane -U'
bind 'l' if-shell "$is_vim" 'send-keys M-Right' 'select-pane -R'
bind-key -T copy-mode-vi 'M-Left' select-pane -L
bind-key -T copy-mode-vi 'M-Down' select-pane -D
bind-key -T copy-mode-vi 'M-Up' select-pane -U
bind-key -T copy-mode-vi 'M-Right' select-pane -R
bind-key -T copy-mode-vi 'M-p' select-pane -l
# Vim copy mode "C-a [" paste "C-a ]"
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key -T copy-mode-vi 'C-v' send-keys -X rectangle-toggle
bind-key -T copy-mode-vi 'y' send-keys -X copy-selection-and-cancel
bind-key -T copy-mode-vi 'Escape' send -X cancel
bind '"' split-window -v -c "#{pane_current_path}"
bind '%' split-window -h -c "#{pane_current_path}"
# Colorscheme for tmux zenwritten
set -g status-left '#[fg=#8e8e8e]#{?client_prefix,#[fg=#de6e7c][#[fg=#8bae68]#S#[fg=#de6e7c]],[#S]}#[fg=#8e8e8e] #{s/root/:/s/prefix//:client_key_table}'
# set -g status-right '#[fg=#8e8e8e][%d/%m] #[fg=#8e8e8e][%I:%M%p]'
set -g status-right '#[fg=#8bae68]#{?client_prefix,prefix,} #[fg=#8e8e8e][%d/%m] #[fg=#8e8e8e][%I:%M%p] [#(hostname)]'
set -g status-left-length 60
set -g status-right-length 60
set -g status-style fg='#8e8e8e',bg='#191919'
set -g window-status-current-style fg='#191919',bg='#8e8e8e',bold
set -g pane-border-style fg='#8e8e8e'
set -g pane-active-border-style fg='#8bae68'
set -g message-style fg='#8e8e8e',bg='#191919'
set -g display-panes-active-colour '#8bae68'
set -g display-panes-colour '#de6e7c'
set -g clock-mode-colour '#8bae68'
set -g mode-style fg='#8bae68',bg='#191919'