forked from backdoer/comprc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
129 lines (99 loc) · 3.54 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
## Remap leader
unbind C-b
#prefix from 'C-b' to 'C-d'
set-option -g prefix C-d
bind-key C-d send-prefix
## Set zsh as the default shell for tmux to use
set-option -g default-shell /bin/zsh
## Mouse Scrolling Enabled
set -g mouse off
###############################
######### Panes ###############
###############################
bind x kill-pane
# split panes using | and -
# bind-key / split-window -h -c '#{pane_current_path}'
bind \\ split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
unbind '"'
unbind %
# navigation
is_vim="echo '#{pane_current_command}' | grep -iqE '(^|\/)vim$'"
is_fzf="ps | grep -iqE fzf$"
bind -n C-h run "($is_vim && tmux send-keys C-h) || \
tmux select-pane -L"
bind -n C-j run "($is_vim && tmux send-keys C-j) || \
($is_fzf && tmux send-keys C-j) || \
tmux select-pane -D"
bind -n C-k run "($is_vim && tmux send-keys C-k) || \
($is_fzf && tmux send-keys C-k) || \
tmux select-pane -U"
bind -n C-l run "($is_vim && tmux send-keys C-l) || \
tmux select-pane -R"
# resize
bind h resize-pane -L 8
bind j resize-pane -D 4
bind k resize-pane -U 4
bind l resize-pane -R 8
# start panes at 1
set -g base-index 1
set -g pane-base-index 1
## Refresh TMUX
bind r source-file ~/.tmux.conf
## VIM
set-window-option -g mode-keys vi
if-shell '[ $(bc <<< $(tmux -V | cut -d" " -f2)" > 2.3") -gt 0 ]' \
"bind-key -T copy-mode-vi 'v' send -X begin-selection; bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel pbcopy" \
"bind-key -Tcopy-mode-vi 'v' send -X begin-selection; bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel \"xclip -i -sel c\""
set-option -g allow-rename off
set -g focus-events on
###############################
########### Theme #############
###############################
# Base of Powerline Blue Block
# Status update interval
#set -g status-interval 1
# Basic status bar colors
set -g status-fg colour243
set -g status-bg colour236
# Left side of status bar
set -g status-left-style fg=colour243,bg=colour234
set -g status-left-length 40
set -g status-left ""
# Right side of status bar
set -g status-right-style fg=colour233,bg=colour233
set -g status-right-length 150
set -g status-right ""
# Window status
set -g window-status-current-format "#[fg=colour253,bg=colour167]#[fg=colour258,bg=colour31] #I 👋 #W #[fg=colour31,bg=colour233,nobold]"
# Current window status
set -g window-status-current-style fg=colour232,bg=colour24
# Window with activity status
set -g window-status-activity-style bg=colour31,fg=colour233 # fg and bg are flipped here due to a bug in tmux
# Window separator
set -g window-status-separator " "
# Window status alignment
#set -g status-justify centre
# Pane border
set -g pane-border-style fg=colour238,bg=default
# Active pane border
set -g pane-active-border-style fg=colour24,bg=default
# Pane number indicator
set -g display-panes-colour colour233
set -g display-panes-active-colour colour245
# Clock mode
#set -g clock-mode-colour colour24
#set -g clock-mode-style 24
# Message
set -g message-style fg=black,bg=colour24
# Command message
set -g message-command-style fg=black,bg=colour233
# Mode
set -g mode-style fg=colour231,bg=colour24
###############################
######### Plugins #############
###############################
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
run '~/.tmux/plugins/tpm/tpm'